mirror of https://github.com/restic/restic.git
Make layout default Dirname() consistent
Always return a trailing slash now.
This commit is contained in:
parent
0c537837d9
commit
069752cb42
|
@ -24,10 +24,10 @@ func (l *DefaultLayout) Dirname(h restic.Handle) string {
|
||||||
p := defaultLayoutPaths[h.Type]
|
p := defaultLayoutPaths[h.Type]
|
||||||
|
|
||||||
if h.Type == restic.DataFile && len(h.Name) > 2 {
|
if h.Type == restic.DataFile && len(h.Name) > 2 {
|
||||||
p = l.Join(p, h.Name[:2])
|
p = l.Join(p, h.Name[:2]) + "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
return l.Join(l.Path, p)
|
return l.Join(l.Path, p) + "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filename returns a path to a file, including its name.
|
// Filename returns a path to a file, including its name.
|
||||||
|
|
Loading…
Reference in New Issue