2024-10-23 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in 'CopyAudio' Web API service that failed to log the
	correct	error message when the operation failed.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2024-10-23 11:13:55 -04:00
parent 62628660af
commit 2ac26727c8
2 changed files with 10 additions and 1 deletions

View File

@@ -24919,3 +24919,6 @@
files to be included in DEB packages. files to be included in DEB packages.
2024-10-09 Fred Gleason <fredg@paravelsystems.com> 2024-10-09 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug that broke the 'make rpm' target. * Fixed a bug that broke the 'make rpm' target.
2024-10-23 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'CopyAudio' Web API service that failed to log the
correct error message when the operation failed.

View File

@@ -72,11 +72,17 @@ void Xport::CopyAudio()
// //
// Make the copy // 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()); unlink(RDCut::pathName(destination_cartnum,destination_cutnum).toUtf8());
if(link(RDCut::pathName(source_cartnum,source_cutnum).toUtf8(), if(link(RDCut::pathName(source_cartnum,source_cutnum).toUtf8(),
RDCut::pathName(destination_cartnum,destination_cutnum).toUtf8())!=0) { 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, SendNotification(RDNotification::CartType,RDNotification::ModifyAction,
QVariant(destination_cartnum)); QVariant(destination_cartnum));
XmlExit("OK",200,"copyaudio.cpp",LINE_NUMBER); XmlExit("OK",200,"copyaudio.cpp",LINE_NUMBER);