mirror of
https://github.com/restic/restic.git
synced 2025-08-20 08:57:29 +00:00
backup: Always use cleaned path for excludes
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user