* replace all occurences of `errors.Fatal(err.Error())` with `errors.Fatalf("%s", err)` so that the error wrapping is correct across the codebase
* updated the review comments
This adds proper support for filenames that include directories. For
example, `/foo/bar` would result in an error when trying to open `/foo`.
The directory tree is now build upfront. This ensures let's the
directory tree construction be handled only once. All accessors then
only have to look up the constructed directory entries.
* bugfix: write pprof file for `--{cpu,mem,...}-profile` even on error code
Before this, if `restic backup --cpu-profile dir/ backup-dir/` couldn't
read some of the input files (e.g. they weren't readable by the user
restic was running under), the `cpu.pprof` file it outputs would be
empty.
https://github.com/spf13/cobra/issues/1893
* drop changelog as it's not relevant for end users
---------
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
* bugfix: write pprof file for `--{cpu,mem,...}-profile` even on error code
Before this, if `restic backup --cpu-profile dir/ backup-dir/` couldn't
read some of the input files (e.g. they weren't readable by the user
restic was running under), the `cpu.pprof` file it outputs would be
empty.
https://github.com/spf13/cobra/issues/1893
* drop changelog as it's not relevant for end users
---------
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
This adds proper support for filenames that include directories. For
example, `/foo/bar` would result in an error when trying to open `/foo`.
The directory tree is now build upfront. This ensures let's the
directory tree construction be handled only once. All accessors then
only have to look up the constructed directory entries.