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:
parent
a3ef692132
commit
5476ece81e
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue