mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 02:08:54 +00:00
Merge pull request #4816 from jrast/fix-statvfs
Replaced usage of os.statvfs with shutil.disk_usage
This commit is contained in:
commit
1200690a3f
1 changed files with 1 additions and 2 deletions
|
@ -1116,8 +1116,7 @@ def __init__(self, repository, pack=None, unpack=None, transform=None):
|
|||
self.enospc = 0
|
||||
|
||||
def query_size_limit(self):
|
||||
stat_fs = os.statvfs(self.basedir)
|
||||
available_space = stat_fs.f_bavail * stat_fs.f_frsize
|
||||
available_space = shutil.disk_usage(self.basedir).free
|
||||
self.size_limit = int(min(available_space * 0.25, 2**31))
|
||||
|
||||
def key_filename(self, key):
|
||||
|
|
Loading…
Reference in a new issue