mirror of
https://github.com/restic/restic.git
synced 2026-10-18 15:38:12 +00:00
fs/reader: return proper error on invalid filename
This commit is contained in:
1 parent
ddd48f1e98
commit
9f39e8a1d3
5 files changed
+30
-20
No files matched your search
@@ -591,10 +591,13 @@ func runBackup(ctx context.Context, opts BackupOptions, gopts GlobalOptions, ter
|
||||
return err
|
||||
}
|
||||
}
|
||||
targetFS = fs.NewReader(filename, source, fs.ReaderOptions{
|
||||
targetFS, err = fs.NewReader(filename, source, fs.ReaderOptions{
|
||||
ModTime: timeStamp,
|
||||
Mode: 0644,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to backup from stdin: %w", err)
|
||||
}
|
||||
targets = []string{filename}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user