mirror of
https://github.com/restic/restic.git
synced 2026-11-19 23:01:08 +00:00
snapshot: correct error handling for filepath.Abs
This commit is contained in:
1 parent
0532f08048
commit
4e0b2a8e3a
2 files changed
+8
-1
No files matched your search
@@ -31,7 +31,7 @@ type Snapshot struct {
|
||||
// time.
|
||||
func NewSnapshot(paths []string, tags []string, hostname string, time time.Time) (*Snapshot, error) {
|
||||
for i, path := range paths {
|
||||
if p, err := filepath.Abs(path); err != nil {
|
||||
if p, err := filepath.Abs(path); err == nil {
|
||||
paths[i] = p
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user