mirror of
https://github.com/octoleo/restic.git
synced 2024-12-27 20:45:19 +00:00
dump flag --target should be allowed to write existing file
Signed-off-by: lou <alex1988@outlook.com>
This commit is contained in:
parent
6a2b10e2a8
commit
80db02fc35
@ -174,7 +174,7 @@ func runDump(ctx context.Context, opts DumpOptions, gopts GlobalOptions, args []
|
||||
canWriteArchiveFunc := checkStdoutArchive
|
||||
|
||||
if opts.Target != "" {
|
||||
file, err := os.OpenFile(opts.Target, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0o666)
|
||||
file, err := os.Create(opts.Target)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot dump to file: %w", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user