1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-30 11:11:28 +00:00

fake regular file mode for --read-special mode, fixes #1214

This commit is contained in:
Thomas Waldmann 2016-07-02 20:17:07 +02:00
parent a3ef692132
commit 5476ece81e

View file

@ -630,6 +630,10 @@ def process_file(self, path, st, cache, ignore_inode=False):
status = status or 'M' # regular file, modified (if not 'A' already)
item[b'chunks'] = chunks
item.update(self.stat_attrs(st, path))
if not is_regular_file:
# we processed a special file like a regular file. reflect that in mode,
# so it can be extracted / accessed in fuse mount like a regular file:
item[b'mode'] = stat.S_IFREG | stat.S_IMODE(item[b'mode'])
self.stats.nfiles += 1
self.add_item(item)
return status