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