Author: andar
Revision: 5165
Log:
Fix free space check in Windows
Diff:
Modified: branches/1.1.0_RC/ChangeLog
===================================================================
--- branches/1.1.0_RC/ChangeLog 2009-04-25 00:31:07 UTC (rev 5164)
+++ branches/1.1.0_RC/ChangeLog 2009-04-25 07:24:58 UTC (rev 5165)
@@ -13,6 +13,7 @@
==== Windows ====
* Fix freezing in create torrent dialog
* Fix creating torrents in Windows
+ * Fix free space check
=== Deluge 1.1.6 - (06 April 2009) ===
==== Core ====
Modified: branches/1.1.0_RC/deluge/common.py
===================================================================
--- branches/1.1.0_RC/deluge/common.py 2009-04-25 00:31:07 UTC (rev 5164)
+++ branches/1.1.0_RC/deluge/common.py 2009-04-25 07:24:58 UTC (rev 5165)
@@ -452,10 +452,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
-~----------~----~----~----~------~----~------~--~---