fs: Handle absolute pathname for --stdin-filename

Return valid directory info from Lstat() for parent directories of the
specified filename. Previously only "/" and "." were valid directories.

Also set directory mode as this is checked by archiver.

Closes #2063
This commit is contained in:
Garry McNulty
2019-04-28 20:58:10 +01:00
committed by Alexander Neumann
parent f7f14cf8c9
commit 8066195e6e
3 changed files with 88 additions and 10 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Allow absolute path for filename when backing up from stdin
When backing up from stdin, handle directory path for `--stdin-filename`.
This can be used to specify the full path for the backed-up file.
https://github.com/restic/restic/issues/2063