Skip to content

Commit

Permalink
fix: changed path join library (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
abskrj authored Sep 17, 2023
1 parent fa527cc commit a9c4e97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
20 changes: 0 additions & 20 deletions Dockerfile

This file was deleted.

9 changes: 4 additions & 5 deletions utils/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
"log"
"os"
"path"
"path/filepath"
"strings"
"zestream-server/constants"
Expand All @@ -22,15 +21,15 @@ func GetDownloadFilePathName(fileName string) (string, error) {
return "", err
}

pathName := path.Join(cwd, constants.DOWNLOAD_FILE_PATH_PREFIX)
pathName := filepath.Join(cwd, constants.DOWNLOAD_FILE_PATH_PREFIX)

err = createDirPath(pathName)

if err != nil {
return "", err
}

newPath := path.Join(pathName, fileName)
newPath := filepath.Join(pathName, fileName)

return newPath, nil
}
Expand All @@ -49,15 +48,15 @@ func GetOutputFilePathName(fileName string, postfix string) (string, error) {
// TODO: replace filename with id
fileName = strings.Replace(fileName, ".", "_", 1)

pathName := path.Join(cwd, constants.OUTPUT_FILE_PATH_PREFIX, fileName)
pathName := filepath.Join(cwd, constants.OUTPUT_FILE_PATH_PREFIX, fileName)

err = createDirPath(pathName)

if err != nil {
return "", err
}

newPath := path.Join(pathName, postfix)
newPath := filepath.Join(pathName, postfix)

return newPath, nil
}
Expand Down

0 comments on commit a9c4e97

Please sign in to comment.