Tag editor: only write files with modified tags (#536)

wilder
gardockt 2 years ago committed by GitHub
parent 8746ded880
commit 95bca25cb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      src/screens/tag_editor.cpp

@ -798,13 +798,16 @@ void TagEditor::runAction()
Statusbar::print("Writing changes...");
for (auto it = EditedSongs.begin(); it != EditedSongs.end(); ++it)
{
Statusbar::printf("Writing tags in \"%1%\"...", (*it)->getName());
if (!Tags::write(**it))
if ((*it)->isModified())
{
Statusbar::printf("Error while writing tags to \"%1%\": %2%",
(*it)->getName(), strerror(errno));
success = 0;
break;
Statusbar::printf("Writing tags in \"%1%\"...", (*it)->getName());
if (!Tags::write(**it))
{
Statusbar::printf("Error while writing tags to \"%1%\": %2%",
(*it)->getName(), strerror(errno));
success = 0;
break;
}
}
}
if (success)

Loading…
Cancel
Save