Skip to content

Commit

Permalink
fix podcast mkdir for podcast episode
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Apr 20, 2024
1 parent 7b21e82 commit 38ab0b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion podcast/podcast.go
Expand Up @@ -484,7 +484,7 @@ func (p *Podcasts) doPodcastDownload(podcast *db.Podcast, podcastEpisode *db.Pod
if err := p.db.Save(&podcastEpisode).Error; err != nil {
return fmt.Errorf("save podcast episode: %w", err)
}
if err := os.MkdirAll(filepath.Dir(podcastEpisode.Filename), os.ModePerm); err != nil {
if err := os.MkdirAll(filepath.Dir(filepath.Join(podcast.RootDir, podcastEpisode.Filename)), os.ModePerm); err != nil {
return fmt.Errorf("make podcast root dir: %w", err)
}
file, err := os.Create(filepath.Join(podcast.RootDir, podcastEpisode.Filename))
Expand Down

0 comments on commit 38ab0b0

Please sign in to comment.