File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 16
16
spicetifyFolder = utils .GetSpicetifyFolder ()
17
17
rawFolder , themedFolder = getExtractFolder ()
18
18
backupFolder = utils .GetStateFolder ("Backup" )
19
- userThemesFolder = utils .GetUserFolder ( "Themes" )
19
+ userThemesFolder = utils .GetSubFolder ( spicetifyFolder , "Themes" )
20
20
quiet bool
21
21
isAppX = false
22
22
spotifyPath string
Original file line number Diff line number Diff line change @@ -92,20 +92,21 @@ func GetStateFolder(name string) string {
92
92
93
93
result = filepath .Join (parent , "spicetify" )
94
94
}
95
- return result
95
+
96
+ return GetSubFolder (result , name )
96
97
}
97
98
98
- // getUserFolder checks if folder `name` is available in spicetifyFolder ,
99
+ // GetSubFolder checks if folder `name` is available in specified folder ,
99
100
// else creates then returns the path.
100
- func GetUserFolder ( name string ) string {
101
- dir := filepath .Join (GetSpicetifyFolder () , name )
101
+ func GetSubFolder ( folder string , name string ) string {
102
+ dir := filepath .Join (folder , name )
102
103
CheckExistAndCreate (dir )
103
104
104
105
return dir
105
106
}
106
107
107
- var userAppsFolder = GetUserFolder ( "CustomApps" )
108
- var userExtensionsFolder = GetUserFolder ( "Extensions" )
108
+ var userAppsFolder = GetSubFolder ( GetSpicetifyFolder (), "CustomApps" )
109
+ var userExtensionsFolder = GetSubFolder ( GetSpicetifyFolder (), "Extensions" )
109
110
110
111
func GetCustomAppSubfolderPath (folderPath string ) string {
111
112
entries , err := os .ReadDir (folderPath )
You can’t perform that action at this time.
0 commit comments