mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 23:06:32 +00:00
backup: Always use cleaned path for excludes
This commit is contained in:
parent
9180e2c48a
commit
18d4ac2fd9
@ -185,6 +185,7 @@ func isDirExcludedByFile(dir, tagFilename, header string) bool {
|
||||
func gatherDevices(items []string) (deviceMap map[string]uint64, err error) {
|
||||
deviceMap = make(map[string]uint64)
|
||||
for _, item := range items {
|
||||
item = filepath.Clean(item)
|
||||
fi, err := fs.Lstat(item)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -215,6 +216,8 @@ func rejectByDevice(samples []string) (RejectFunc, error) {
|
||||
return false
|
||||
}
|
||||
|
||||
item = filepath.Clean(item)
|
||||
|
||||
id, err := fs.DeviceID(fi)
|
||||
if err != nil {
|
||||
// This should never happen because gatherDevices() would have
|
||||
|
Loading…
Reference in New Issue
Block a user