mirror of
https://github.com/restic/restic.git
synced 2026-05-30 22:05:24 +00:00
fs/reader: return proper error on invalid filename
This commit is contained in:
@@ -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