summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2019-11-24 03:03:32 +0100
committerclsr <clsr@clsr.net>2019-11-24 03:03:32 +0100
commit8c91b41872df9f1d0eb991c0b0d8826f4346cba4 (patch)
tree51f5f93a389f3f12d3275e3d9dc6ff49ac84aabc
parent08ad3ae7d038bd51b2ce42b864fc56d03f14e2e6 (diff)
downloadgomf-modpanel-master.tar.gz
gomf-modpanel-master.zip
Move deleted.log.json into the gomf root directoryHEADmaster
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index 5caa02b..da9a480 100644
--- a/main.go
+++ b/main.go
@@ -39,7 +39,9 @@ func getLogNames() ([]string, error) {
}
var logNames []string
for _, log := range logs {
- logNames = append(logNames, strings.Split(log.Name(), ".")[0])
+ if log.Name() != "deleted.log.json" {
+ logNames = append(logNames, strings.Split(log.Name(), ".")[0])
+ }
}
return logNames, nil
}
@@ -342,7 +344,7 @@ func main() {
uploads = storage.NewStorage(path.Join(gomfRoot, "upload"))
var err error
- deletedLog, err = os.OpenFile("deleted.log.json", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600)
+ deletedLog, err = os.OpenFile(path.Join(gomfRoot, "log", "deleted.log.json"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600)
if err != nil {
panic(err)
}