diff --git a/ChangeLog b/ChangeLog index e419fd8a..fce58b5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24919,3 +24919,6 @@ files to be included in DEB packages. 2024-10-09 Fred Gleason * Fixed a bug that broke the 'make rpm' target. +2024-10-23 Fred Gleason + * Fixed a bug in 'CopyAudio' Web API service that failed to log the + correct error message when the operation failed. diff --git a/web/rdxport/copyaudio.cpp b/web/rdxport/copyaudio.cpp index d7a14521..5a34624f 100644 --- a/web/rdxport/copyaudio.cpp +++ b/web/rdxport/copyaudio.cpp @@ -72,11 +72,17 @@ void Xport::CopyAudio() // // Make the copy // + rda->syslog(LOG_NOTICE,"creating hard link %s => %s", + RDCut::pathName(source_cartnum,source_cutnum).toUtf8().constData(), + RDCut::pathName(destination_cartnum,destination_cutnum).toUtf8().constData()); + unlink(RDCut::pathName(destination_cartnum,destination_cutnum).toUtf8()); if(link(RDCut::pathName(source_cartnum,source_cutnum).toUtf8(), RDCut::pathName(destination_cartnum,destination_cutnum).toUtf8())!=0) { - XmlExit(strerror(errno),400,"copyaudio.cpp",LINE_NUMBER); + QString err_msg=strerror(errno); + XmlExit(err_msg,400,"copyaudio.cpp",LINE_NUMBER); } + SendNotification(RDNotification::CartType,RDNotification::ModifyAction, QVariant(destination_cartnum)); XmlExit("OK",200,"copyaudio.cpp",LINE_NUMBER);