Handle symlink zip files (#5249)

This commit is contained in:
WithoutPants
2024-09-11 13:58:02 +10:00
committed by GitHub
parent d1c207e40b
commit a17199ba21
7 changed files with 18 additions and 17 deletions

View File

@@ -41,6 +41,7 @@ type folderQueryRow struct {
ZipBasename null.String `db:"zip_basename"`
ZipFolderPath null.String `db:"zip_folder_path"`
ZipSize null.Int `db:"zip_size"`
}
func (r *folderQueryRow) resolve() *models.Folder {
@@ -61,6 +62,7 @@ func (r *folderQueryRow) resolve() *models.Folder {
ID: *ret.ZipFileID,
Path: filepath.Join(r.ZipFolderPath.String, r.ZipBasename.String),
Basename: r.ZipBasename.String,
Size: r.ZipSize.Int64,
}
}
@@ -148,6 +150,8 @@ func (qb *FolderStore) selectDataset() *goqu.SelectDataset {
table.Col("updated_at"),
zipFileTable.Col("basename").As("zip_basename"),
zipFolderTable.Col("path").As("zip_folder_path"),
// size is needed to open containing zip files
zipFileTable.Col("size").As("zip_size"),
}
ret := dialect.From(table).Select(cols...)