(name string)
| 184 | } |
| 185 | |
| 186 | func GetCustomAppPath(name string) (string, error) { |
| 187 | customAppFolderPath := filepath.Join(userAppsFolder, name) |
| 188 | |
| 189 | if _, err := os.Stat(customAppFolderPath); err == nil { |
| 190 | customAppActualFolderPath := GetCustomAppSubfolderPath(customAppFolderPath) |
| 191 | if customAppActualFolderPath != "" { |
| 192 | return customAppActualFolderPath, nil |
| 193 | } |
| 194 | return customAppFolderPath, nil |
| 195 | } |
| 196 | |
| 197 | customAppFolderPath = filepath.Join(GetExecutableDir(), "CustomApps", name) |
| 198 | |
| 199 | if _, err := os.Stat(customAppFolderPath); err == nil { |
| 200 | customAppActualFolderPath := GetCustomAppSubfolderPath(customAppFolderPath) |
| 201 | if customAppActualFolderPath != "" { |
| 202 | return customAppActualFolderPath, nil |
| 203 | } |
| 204 | return customAppFolderPath, nil |
| 205 | } |
| 206 | |
| 207 | return "", errors.New("custom app not found") |
| 208 | } |
| 209 | |
| 210 | func GetExtensionPath(name string) (string, error) { |
| 211 | extFilePath := filepath.Join(userExtensionsFolder, name) |
no test coverage detected