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

@@ -68,8 +68,8 @@ func CreateSnapshotFromDirectory(id string, top string) (snapshot *Snapshot, ski
var patterns []string
duplicacyDirectory := GetDotDuplicacyPathName(top)
patternFile, err := ioutil.ReadFile(path.Join(duplicacyDirectory, "filters"))
preferencePath := GetDuplicacyPreferencePath(top)
patternFile, err := ioutil.ReadFile(path.Join(preferencePath, "filters"))
if err == nil {
for _, pattern := range strings.Split(string(patternFile), "\n") {
pattern = strings.TrimSpace(pattern)