하드코딩된 폴더들 const로 뺌

This commit is contained in:
2023-06-22 17:15:56 +09:00
parent bdc3e19718
commit 3278bca32f
2 changed files with 15 additions and 8 deletions

View File

@ -45,9 +45,10 @@ func NewHoustonHandler() HoustonServerWithHandler {
}
func (h *houstonHandler) RegisterHandlers(serveMux *http.ServeMux, prefix string) error {
storagePath := loadServerConfig().StorageRoot
h.deployPath = path.Join(storagePath, "deploys")
h.downloadPath = path.Join(storagePath, "downloads")
config := loadServerConfig()
storagePath := config.StorageRoot
h.deployPath = path.Join(storagePath, sub_folder_name_deploys)
h.downloadPath = path.Join(storagePath, sub_folder_name_downloads)
if err := os.MkdirAll(h.deployPath, 0775); err != nil {
return err