diff options
Diffstat (limited to 'test/DumpDatabase.cxx')
-rw-r--r-- | test/DumpDatabase.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx index 14bb4ba14..6e9259238 100644 --- a/test/DumpDatabase.cxx +++ b/test/DumpDatabase.cxx @@ -49,7 +49,10 @@ DumpDirectory(const Directory &directory, Error &) static bool DumpSong(Song &song, Error &) { - cout << "S " << song.parent->path << "/" << song.uri << endl; + cout << "S "; + if (song.parent != nullptr && !song.parent->IsRoot()) + cout << song.parent->path << "/"; + cout << song.uri << endl; return true; } |