Author: damoxc
Revision: 5106
Log:
fix checking the free diskspace on windows 7
Diff:
Modified: trunk/deluge/common.py
===================================================================
--- trunk/deluge/common.py 2009-04-20 20:40:44 UTC (rev 5105)
+++ trunk/deluge/common.py 2009-04-20 21:05:05 UTC (rev 5106)
@@ -446,10 +446,9 @@
"""
if windows_check():
- import win32api
- drive = path.split(":")[0]
- free = win32api.GetDiskFreeSpaceEx(drive)[0]
- return free
+ import win32file
+ sectors, bytes, free, total = map(long,
win32file.GetDiskFreeSpace(path))
+ return (free * sectors * bytes)
else:
disk_data = os.statvfs(path)
block_size = disk_data.f_bsize
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---