2019-12-17 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdexport(1) that caused output filenames containing
	multi-byte UTF-8 characters to be corrupt.
This commit is contained in:
Fred Gleason
2019-12-17 17:49:55 -05:00
parent 2b3b733c0e
commit 036f3c1c46
3 changed files with 19 additions and 14 deletions

View File

@@ -199,7 +199,7 @@ RDAudioExport::ErrorCode RDAudioExport::runExport(const QString &username,
curl_formfree(first);
return RDAudioExport::ErrorInternal;
}
if((f=fopen(conv_dst_filename,"w"))==NULL) {
if((f=fopen(conv_dst_filename.toUtf8(),"w"))==NULL) {
curl_easy_cleanup(curl);
curl_formfree(first);
return RDAudioExport::ErrorNoDestination;
@@ -227,7 +227,7 @@ RDAudioExport::ErrorCode RDAudioExport::runExport(const QString &username,
case CURLE_ABORTED_BY_CALLBACK:
curl_easy_cleanup(curl);
curl_formfree(first);
unlink(conv_dst_filename);
unlink(conv_dst_filename.toUtf8());
return RDAudioExport::ErrorAborted;
case CURLE_UNSUPPORTED_PROTOCOL:
@@ -278,7 +278,7 @@ RDAudioExport::ErrorCode RDAudioExport::runExport(const QString &username,
default:
ret=RDAudioExport::ErrorConverter;
}
unlink(conv_dst_filename);
unlink(conv_dst_filename.toUtf8());
return ret;
}