Commit d3ae0550 authored by Max Kellermann's avatar Max Kellermann

SongUpdate: remove archive handling from LoadFile()

This code has been moved to LoadFromArchive().
parent 96f4394d
...@@ -51,16 +51,7 @@ Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent) ...@@ -51,16 +51,7 @@ Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent)
assert(strchr(path_utf8, '\n') == nullptr); assert(strchr(path_utf8, '\n') == nullptr);
Song *song = NewFile(path_utf8, parent); Song *song = NewFile(path_utf8, parent);
if (!song->UpdateFile(storage)) {
//in archive ?
bool success =
#ifdef ENABLE_ARCHIVE
parent.device == DEVICE_INARCHIVE
? song->UpdateFileInArchive(storage)
:
#endif
song->UpdateFile(storage);
if (!success) {
song->Free(); song->Free();
return nullptr; return nullptr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment