1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2024-11-28 10:03:42 +02:00

[#2548] use fileath.Clean on the fs.WalkDirFunc argument to ensure that the same normalizations are applied

This commit is contained in:
Gani Georgiev 2023-05-23 18:34:24 +03:00
parent db20e38cda
commit ce28a9af78

View File

@ -51,7 +51,7 @@ func zipAddFS(w *zip.Writer, fsys fs.FS, skipPaths ...string) error {
// skip
for _, ignore := range skipPaths {
if ignore == name ||
strings.HasPrefix(name+string(os.PathSeparator), filepath.Clean(ignore)+string(os.PathSeparator)) {
strings.HasPrefix(filepath.Clean(name)+string(os.PathSeparator), filepath.Clean(ignore)+string(os.PathSeparator)) {
return nil
}
}