Make layout default Dirname() consistent

Always return a trailing slash now.
This commit is contained in:
Alexander Neumann 2017-05-15 23:35:52 +02:00
parent 0c537837d9
commit 069752cb42
1 changed files with 2 additions and 2 deletions

View File

@ -24,10 +24,10 @@ func (l *DefaultLayout) Dirname(h restic.Handle) string {
p := defaultLayoutPaths[h.Type]
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.