From 0acbdde7a8e903648d94103a301484839f1db6f8 Mon Sep 17 00:00:00 2001 From: simulot Date: Fri, 22 Nov 2024 11:06:17 +0100 Subject: [PATCH] fix #534 --- adapters/folder/readFolder.go | 3 ++- internal/fshelper/extendedFS.go | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/adapters/folder/readFolder.go b/adapters/folder/readFolder.go index a90d73f..719c359 100644 --- a/adapters/folder/readFolder.go +++ b/adapters/folder/readFolder.go @@ -309,7 +309,8 @@ func (la *LocalAssetBrowser) parseDir(ctx context.Context, fsys fs.FS, dir strin parts = append(parts, fsName) } if dir != "." { - parts = append(parts, strings.Split(dir, string(filepath.Separator))...) + parts = append(parts, strings.Split(dir, "/")...) + // parts = append(parts, strings.Split(dir, string(filepath.Separator))...) } Album = strings.Join(parts, la.flags.AlbumNamePathSeparator) } diff --git a/internal/fshelper/extendedFS.go b/internal/fshelper/extendedFS.go index d4c0900..f3e482d 100644 --- a/internal/fshelper/extendedFS.go +++ b/internal/fshelper/extendedFS.go @@ -59,7 +59,9 @@ func MkdirAll(fsys fs.FS, path string, perm fs.FileMode) error { return fsys.MkdirAll(path, perm) } if fsys, ok := fsys.(FSCanWrite); ok { - parts := strings.Split(path, string(filepath.Separator)) + parts := strings.Split(path, "/") + + // parts := strings.Split(path, string(filepath.Separator)) path = "" for i := 0; i < len(parts); i++ { path = filepath.Join(path, parts[i])