minor fix for cross device linking

This commit is contained in:
Cooper Hammond 2021-04-13 22:39:33 -06:00
parent 8f25eae1cb
commit 3f12a880e9

View file

@ -67,7 +67,8 @@ class Playlist < SpotifyList
FileUtils.mkdir_p(strpath)
end
safe_filename = song.filename.gsub(/[\/]/, "").gsub(" ", " ")
File.rename("./" + song.filename, (path / safe_filename).to_s)
FileUtils.cp("./" + song.filename, (path / safe_filename).to_s)
FileUtils.rm("./" + song.filename)
else
song.organize_it()
end