diff --git a/README.md b/README.md index c91b139..9059953 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ Load a launchpad app layout from a YAML config file - [ ] add ability to save/load JSON as well as YAML - [x] fix issue where if no files for a folder are installed don't create that folder (might cause eventual DB coruption) - [ ] add ability to org dock as well `dorg` ? :wink: +- [ ] backup current launchpad layout before changing ## Issues diff --git a/VERSION b/VERSION index c85e143..37a7b90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -17.12.7 \ No newline at end of file +17.12.8 \ No newline at end of file diff --git a/utils.go b/utils.go index 943ab7d..311da98 100644 --- a/utils.go +++ b/utils.go @@ -118,10 +118,12 @@ func removeOldDatabaseFiles(dbpath string) error { } for _, path := range paths { - if err := os.Remove(path); err != nil { - return errors.Wrap(err, "removing file failed") + if _, err := os.Stat(path); os.IsExist(err) { + if err := os.Remove(path); err != nil { + return errors.Wrap(err, "removing file failed") + } + utils.DoubleIndent(log.WithField("path", path).Info)("removed old file") } - utils.DoubleIndent(log.WithField("path", path).Info)("removed old file") } return restartDock()