|
|
@ -2,6 +2,7 @@ package Filesystem |
|
|
|
|
|
|
|
import ( |
|
|
|
"regexp" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"PackageManager/Variables" |
|
|
|
) |
|
|
@ -33,7 +34,7 @@ func InitPruneRegex() error { |
|
|
|
) |
|
|
|
|
|
|
|
for _, s = range Variables.PruneRegexPaths { |
|
|
|
r, err = regexp.Compile(s) |
|
|
|
r, err = regexp.Compile(strings.Replace(s, "^/", "^"+Variables.RootDir, 1)) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
@ -50,7 +51,7 @@ func InitIgnoreRegex() error { |
|
|
|
) |
|
|
|
|
|
|
|
for _, s = range Variables.IgnoreRegexPaths { |
|
|
|
r, err = regexp.Compile(s) |
|
|
|
r, err = regexp.Compile(strings.Replace(s, "^/", "^"+Variables.RootDir, 1)) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|