[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

@@ -438,8 +438,7 @@ func (qb *GalleryStore) FindByPath(ctx context.Context, p string) ([]*models.Gal
foldersTable := folderTableMgr.table
basename := filepath.Base(p)
dir, _ := path(filepath.Dir(p)).Value()
pp, _ := path(p).Value()
dir := filepath.Dir(p)
sq := dialect.From(table).LeftJoin(
galleriesFilesJoinTable,
@@ -459,7 +458,7 @@ func (qb *GalleryStore) FindByPath(ctx context.Context, p string) ([]*models.Gal
fileFoldersTable.Col("path").Eq(dir),
filesTable.Col("basename").Eq(basename),
),
foldersTable.Col("path").Eq(pp),
foldersTable.Col("path").Eq(p),
),
)