Refactor variable names and revert shadow copy path computation

This commit is contained in:
Etienne Charlier
2017-06-07 21:01:50 +02:00
parent c88e148d59
commit c688c501d3
7 changed files with 41 additions and 43 deletions

View File

@@ -1511,8 +1511,8 @@ func (manager *SnapshotManager) PruneSnapshots(top string, selfID string, snapsh
LOG_WARN("DELETE_OPTIONS", "Tags or retention policy will be ignored if at least one revision is specified")
}
duplicacyDirectory := GetDotDuplicacyPathName(top)
logDir := path.Join(duplicacyDirectory, "logs")
preferencePath := GetDuplicacyPreferencePath(top)
logDir := path.Join(preferencePath, "logs")
os.Mkdir(logDir, 0700)
logFileName := path.Join(logDir, time.Now().Format("prune-log-20060102-150405"))
logFile, err := os.OpenFile(logFileName, os.O_WRONLY | os.O_CREATE | os.O_TRUNC, 0600)