mirror of https://github.com/borgbackup/borg.git
Merge pull request #3963 from ThomasWaldmann/chunker-fd-only
Chunker: give os-level fd only
This commit is contained in:
commit
20abc9d687
|
@ -1151,9 +1151,11 @@ class FilesystemObjectProcessors:
|
||||||
else:
|
else:
|
||||||
with backup_io('open'):
|
with backup_io('open'):
|
||||||
fh = Archive._open_rb(path)
|
fh = Archive._open_rb(path)
|
||||||
with os.fdopen(fh, 'rb') as fd:
|
try:
|
||||||
self.process_file_chunks(item, cache, self.stats, self.show_progress, backup_io_iter(self.chunker.chunkify(fd, fh)))
|
self.process_file_chunks(item, cache, self.stats, self.show_progress, backup_io_iter(self.chunker.chunkify(None, fh)))
|
||||||
md = self.metadata_collector.stat_attrs(st, path, fd=fh)
|
md = self.metadata_collector.stat_attrs(st, path, fd=fh)
|
||||||
|
finally:
|
||||||
|
os.close(fh)
|
||||||
if not is_special_file:
|
if not is_special_file:
|
||||||
# we must not memorize special files, because the contents of e.g. a
|
# we must not memorize special files, because the contents of e.g. a
|
||||||
# block or char device will change without its mtime/size/inode changing.
|
# block or char device will change without its mtime/size/inode changing.
|
||||||
|
|
Loading…
Reference in New Issue