fehlerbehebung
This commit is contained in:
parent
573721e116
commit
d13d5cd9da
12
main.go
12
main.go
|
@ -85,7 +85,7 @@ func handler() {
|
|||
*/
|
||||
}
|
||||
|
||||
var alreadyHandledFiles []string = []string{}
|
||||
var alreadyHandledFiles []string = []string{"./web/pages/admin/dashboard.html"}
|
||||
|
||||
func handleFilesInFolder(urlPrefix string, folderpath string, handleWithoutFileSuffix bool) {
|
||||
if folderpath[len(folderpath)-1] != '/' {
|
||||
|
@ -97,8 +97,8 @@ func handleFilesInFolder(urlPrefix string, folderpath string, handleWithoutFileS
|
|||
for _, file := range files {
|
||||
alreadyHandled := stringListContains(alreadyHandledFiles, folderpath+file.Name())
|
||||
|
||||
if !file.IsDir() {
|
||||
if !alreadyHandled {
|
||||
if !alreadyHandled {
|
||||
if !file.IsDir() {
|
||||
f := strings.Split(file.Name(), ".")
|
||||
ContentType := f[len(f)-1]
|
||||
filename := ""
|
||||
|
@ -135,11 +135,11 @@ func handleFilesInFolder(urlPrefix string, folderpath string, handleWithoutFileS
|
|||
}
|
||||
alreadyHandledFiles = append(alreadyHandledFiles, folderpath+file.Name())
|
||||
} else {
|
||||
logger("handleFilesInFolder -> already handled : " + folderpath + file.Name())
|
||||
childFolder := file.Name()
|
||||
handleFilesInFolder(childFolder, folderpath+childFolder, handleWithoutFileSuffix)
|
||||
}
|
||||
} else {
|
||||
childFolder := file.Name()
|
||||
handleFilesInFolder(childFolder, folderpath+childFolder, handleWithoutFileSuffix)
|
||||
logger("handleFilesInFolder -> already handled : " + folderpath + file.Name())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue