aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistSong.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PlaylistSong.cxx')
-rw-r--r--src/PlaylistSong.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/PlaylistSong.cxx b/src/PlaylistSong.cxx
index 4cd076eeb..4fbfb65a4 100644
--- a/src/PlaylistSong.cxx
+++ b/src/PlaylistSong.cxx
@@ -100,12 +100,11 @@ playlist_check_load_song(const DetachedSong *song, const char *uri, bool secure)
if (uri_has_scheme(uri)) {
dest = new DetachedSong(uri);
} else if (PathTraitsUTF8::IsAbsolute(uri) && secure) {
- Song *tmp = Song::LoadFile(uri, nullptr);
- if (tmp == nullptr)
+ dest = new DetachedSong(uri);
+ if (!dest->Update()) {
+ delete dest;
return nullptr;
-
- dest = new DetachedSong(*tmp);
- delete tmp;
+ }
} else {
const Database *db = GetDatabase();
if (db == nullptr)