[Files Refactor] Rollback platform-agnostic paths (#2852)

* Rollback platform agnostic path storage
* Add release note for database change
This commit is contained in:
WithoutPants
2022-08-26 14:56:46 +10:00
parent 0c7b5cf6a1
commit 7b439556c0
13 changed files with 149 additions and 206 deletions

View File

@@ -491,13 +491,11 @@ func (qb *SceneStore) FindByPath(ctx context.Context, p string) ([]*models.Scene
filesTable := fileTableMgr.table
foldersTable := folderTableMgr.table
basename := filepath.Base(p)
dirStr := filepath.Dir(p)
dir := filepath.Dir(p)
// replace wildcards
basename = strings.ReplaceAll(basename, "*", "%")
dirStr = strings.ReplaceAll(dirStr, "*", "%")
dir, _ := path(dirStr).Value()
dir = strings.ReplaceAll(dir, "*", "%")
sq := dialect.From(scenesFilesJoinTable).InnerJoin(
filesTable,