mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Fix #2240 : Win32 freespace issue with large capacity drives
This commit is contained in:
parent
18bcdd09d3
commit
637578375c
1 changed files with 2 additions and 3 deletions
|
@ -526,9 +526,8 @@ def free_space(path):
|
|||
raise InvalidPathError("%s is not a valid path" % path)
|
||||
|
||||
if windows_check():
|
||||
import win32file
|
||||
sectors, bytes, free, total = map(long, win32file.GetDiskFreeSpace(path))
|
||||
return (free * sectors * bytes)
|
||||
from win32file import GetDiskFreeSpaceEx
|
||||
return GetDiskFreeSpaceEx(path)[0]
|
||||
else:
|
||||
disk_data = os.statvfs(path.encode("utf8"))
|
||||
block_size = disk_data.f_frsize
|
||||
|
|
Loading…
Add table
Reference in a new issue