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

@@ -72,8 +72,8 @@ func CreateBackupManager(snapshotID string, storage Storage, top string, passwor
// directory
func (manager *BackupManager) SetupSnapshotCache(top string, storageName string) bool {
duplicacyDirectory := GetDotDuplicacyPathName(top)
cacheDir := path.Join(duplicacyDirectory, "cache", storageName)
preferencePath := GetDuplicacyPreferencePath(top)
cacheDir := path.Join(preferencePath, "cache", storageName)
storage, err := CreateFileStorage(cacheDir, 1)
if err != nil {
@@ -981,8 +981,8 @@ func (manager *BackupManager) RestoreFile(chunkDownloader *ChunkDownloader, chun
var existingFile, newFile *os.File
var err error
duplicacyDirectory := GetDotDuplicacyPathName(top)
temporaryPath := path.Join(duplicacyDirectory, "temporary")
preferencePath := GetDuplicacyPreferencePath(top)
temporaryPath := path.Join(preferencePath, "temporary")
fullPath := joinPath(top, entry.Path)
defer func() {