mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-28 00:00:15 +00:00
fix: improve database file handling (#14043)
This commit is contained in:
@@ -91,6 +91,9 @@ var restoreCmd = &cobra.Command{
|
||||
}
|
||||
fmt.Println(i18n.GetMsgByKeyForCmd("RestoreStep4"))
|
||||
if _, err := os.Stat(path.Join(tmpPath, "db")); err == nil {
|
||||
if err := os.Chmod(path.Join(tmpPath, "db"), 0700); err != nil {
|
||||
return err
|
||||
}
|
||||
dbPath := path.Join(baseDir, "1panel")
|
||||
targetDBDir := path.Join(dbPath, "db")
|
||||
if err := os.RemoveAll(targetDBDir); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user