admin: Create the SYNC directory if it doesn't exist

This commit is contained in:
nemunaire 2023-10-22 17:19:45 +02:00
parent 0ab321bb87
commit 4b03f0befd

View File

@ -186,7 +186,11 @@ func main() {
}
log.Println("Serving pages from memory.")
staticFS = http.FS(sub)
sync.DeepReportPath = path.Join("SYNC", sync.DeepReportPath)
if _, err := os.Stat("SYNC"); os.IsNotExist(err) {
os.MkdirAll("SYNC", 0751)
}
}
if fic.FilesDir, err = filepath.Abs(fic.FilesDir); err != nil {
log.Fatal(err)