Skip to content

Commit 7e0e448

Browse files
committed
refactoring of folder get functions
1 parent c625756 commit 7e0e448

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

common/paths.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,7 @@ func GetDefaultToolsFolder() (string, error) {
118118

119119
// GetDownloadCacheFolder gets a generic cache folder for downloads.
120120
func GetDownloadCacheFolder(item string) (string, error) {
121-
libFolder, err := GetDefaultArduinoFolder()
122-
if err != nil {
123-
return "", err
124-
}
125-
126-
stagingFolder := filepath.Join(libFolder, "staging", item)
127-
return GetFolder(stagingFolder, fmt.Sprint(item, "cache"))
121+
return getDefaultFolder(GetDefaultArduinoFolder, "staging", "cache")
128122
}
129123

130124
// ExecUpdateIndex is a generic procedure to update an index file.

0 commit comments

Comments
 (0)