aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/OtherCommands.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/OtherCommands.cxx')
-rw-r--r--src/command/OtherCommands.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/command/OtherCommands.cxx b/src/command/OtherCommands.cxx
index 7d7853d0f..0daf62c5a 100644
--- a/src/command/OtherCommands.cxx
+++ b/src/command/OtherCommands.cxx
@@ -23,7 +23,7 @@
#include "CommandError.hxx"
#include "UpdateGlue.hxx"
#include "Directory.hxx"
-#include "Song.hxx"
+#include "DetachedSong.hxx"
#include "SongPrint.hxx"
#include "TagPrint.hxx"
#include "TagStream.hxx"
@@ -140,15 +140,14 @@ handle_lsinfo(Client &client, int argc, char *argv[])
if (!client_allow_file(client, path_fs, error))
return print_error(client, error);
- Song *song = Song::LoadFile(path_utf8, nullptr);
- if (song == nullptr) {
+ DetachedSong song(path_utf8);
+ if (!song.Update()) {
command_error(client, ACK_ERROR_NO_EXIST,
"No such file");
return CommandResult::ERROR;
}
- song_print_info(client, *song);
- song->Free();
+ song_print_info(client, song);
return CommandResult::OK;
}