2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 14:56:29 +00:00

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

View File

@ -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.