// Try to place the data folder in the user's home dir
home := homeDir()
if home == "" {
- return "./.bytom"
+ return "./.vapor"
}
switch runtime.GOOS {
case "darwin":
// In order to be compatible with old data path,
// copy the data from the old path to the new path
- oldPath := filepath.Join(home, "Library", "Bytom")
- newPath := filepath.Join(home, "Library", "Application Support", "Bytom")
+ oldPath := filepath.Join(home, "Library", "Vapor")
+ newPath := filepath.Join(home, "Library", "Application Support", "Vapor")
if !isFolderNotExists(oldPath) && isFolderNotExists(newPath) {
if err := os.Rename(oldPath, newPath); err != nil {
log.Errorf("DefaultDataDir: %v", err)
}
return newPath
case "windows":
- return filepath.Join(home, "AppData", "Roaming", "Bytom")
+ return filepath.Join(home, "AppData", "Roaming", "Vapor")
default:
- return filepath.Join(home, ".bytom")
+ return filepath.Join(home, ".vapor")
}
}