Ticket #2240: common.py.diff

File common.py.diff, 503 bytes (added by Ratanak, 12 years ago)

Patch to revert back to GetDiskFreeSpaceEx

  • deluge/common.py

    diff --git a/deluge/common.py b/deluge/common.py
    index 4881d16..5455193 100644
    a b def free_space(path):  
    524524
    525525    if windows_check():
    526526        import win32file
    527         sectors, bytes, free, total = map(long, win32file.GetDiskFreeSpace(path))
    528         return (free * sectors * bytes)
     527        return win32file.GetDiskFreeSpaceEx(path)[0]
    529528    else:
    530529        disk_data = os.statvfs(path.encode("utf8"))
    531530        block_size = disk_data.f_frsize