Skip to content

Commit

Permalink
Automatically create parent directories in CopyProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Apr 30, 2024
1 parent 8d0104a commit 95deac9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/MusicLibrary/Process/CopyProcessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public struct CopyProcessor: LibraryProcessor {

if let newURL, let oldURL {
progress.update(current: i, message: "Copying to \(newURL)...")
try FileManager.default.createDirectory(at: newURL.deletingLastPathComponent(), withIntermediateDirectories: true)
try FileManager.default.copyItem(at: oldURL, to: newURL)

var newTrack = track
Expand Down

0 comments on commit 95deac9

Please sign in to comment.