Commit ec02a1f52b
Unsigned
Layout: unified · split
internal/curd.go +3 −2
| @@ -356,8 +356,9 @@ func StartCurd(userCurdConfig *CurdConfig, anime *Anime, logFile string) string | |||
| 356 | 356 | ||
| 357 | Log(anime, logFile) | 357 | Log(anime, logFile) |
| 358 | 358 | ||
| 359 | // Write anime.AnilistId to .local/share/curd/curd_id | 359 | // Write anime.AnilistId to curd_id in the storage path |
| 360 | idFilePath := filepath.Join(os.Getenv(userCurdConfig.StoragePath), "curd_id") | 360 | idFilePath := filepath.Join(os.ExpandEnv(userCurdConfig.StoragePath), "curd_id") |
| 361 | Log(fmt.Sprintf("idFilePath: %v", idFilePath), logFile) | ||
| 361 | if err := os.MkdirAll(filepath.Dir(idFilePath), 0755); err != nil { | 362 | if err := os.MkdirAll(filepath.Dir(idFilePath), 0755); err != nil { |
| 362 | Log(fmt.Sprintf("Failed to create directory for curd_id: %v", err), logFile) | 363 | Log(fmt.Sprintf("Failed to create directory for curd_id: %v", err), logFile) |
| 363 | } else { | 364 | } else { |