Skip to content

Commit

Permalink
Use 'current' path for syncfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
IamTheFij committed Mar 20, 2023
1 parent ddd1d21 commit 454b55d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions util/build/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,8 @@ func findSyncFolder(v int, dir string) (string, error) {
if err = json.Unmarshal(data, &prefs); err != nil {
return "", err
}
if v == 0 {
return filepath.Dir(prefs.Current), nil
}

if path, ok := prefs.Versions[fmt.Sprintf("%d", v)]; ok {
p := expand(path)
if util.PathExists(p) {
return p, nil
}
return defaultSyncDirV4, nil
}
return "", fmt.Errorf("no syncfolder for version %d", v)
return filepath.Dir(prefs.Current), nil
}

// Look for Alfred 3 preferences plist
Expand Down

0 comments on commit 454b55d

Please sign in to comment.