diff --git a/podcast/podcast.go b/podcast/podcast.go index a8d0bf3..0cf3732 100644 --- a/podcast/podcast.go +++ b/podcast/podcast.go @@ -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))