forked from TrueCloudLab/restic
backup: Always use cleaned path for excludes
This commit is contained in:
parent
9180e2c48a
commit
18d4ac2fd9
1 changed files with 3 additions and 0 deletions
|
@ -185,6 +185,7 @@ func isDirExcludedByFile(dir, tagFilename, header string) bool {
|
||||||
func gatherDevices(items []string) (deviceMap map[string]uint64, err error) {
|
func gatherDevices(items []string) (deviceMap map[string]uint64, err error) {
|
||||||
deviceMap = make(map[string]uint64)
|
deviceMap = make(map[string]uint64)
|
||||||
for _, item := range items {
|
for _, item := range items {
|
||||||
|
item = filepath.Clean(item)
|
||||||
fi, err := fs.Lstat(item)
|
fi, err := fs.Lstat(item)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -215,6 +216,8 @@ func rejectByDevice(samples []string) (RejectFunc, error) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
item = filepath.Clean(item)
|
||||||
|
|
||||||
id, err := fs.DeviceID(fi)
|
id, err := fs.DeviceID(fi)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// This should never happen because gatherDevices() would have
|
// This should never happen because gatherDevices() would have
|
||||||
|
|
Loading…
Reference in a new issue