fix: recreate full directory path and fix hooks

This fixes two bugs. The first had to do with the path library not
working in prod. That involved making a simple version of it that works
in the meantime. The other is rendering a different number of hooks
which required moving hooks outside of an if statement.
This commit is contained in:
Sylvia Crowe
2024-06-03 13:24:20 -07:00
parent f7c2897904
commit bf3a036df9
3 changed files with 26 additions and 19 deletions
+1 -2
View File
@@ -73,9 +73,8 @@ func (fs *FileService) ReadFile(path string) (*FullFile, error) {
var innerFilesInfo []FileInfo
for _, innerFileEntry := range innerFilesEntries {
innerFileInfoInt, _ := innerFileEntry.Info()
fullFilePath := filepath.Join(finfo.Path, innerFileInfoInt.Name())
innerFileInfo := FileInfo{
Path: fullFilePath,
Path: innerFileInfoInt.Name(),
Size: innerFileInfoInt.Size(),
Mode: innerFileInfoInt.Mode(),
ModTime: innerFileInfoInt.ModTime().UnixMilli(),