2018-08-28 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdimport(1) that would throw a spurious SQL error
	when using the '--to-cart=' switch with an already existing cart
	[Issue #000217].
This commit is contained in:
Fred Gleason
2018-08-28 14:25:17 -04:00
parent 83fa79a84d
commit 586661c0be
2 changed files with 11 additions and 4 deletions

View File

@@ -16675,3 +16675,7 @@
2018-08-28 Fred Gleason <fredg@paravelsystems.com>
* Added support for the Spinitron v2 API in the 'spinitron_plus'
RLM [Pull Request #000211].
2018-08-28 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdimport(1) that would throw a spurious SQL error
when using the '--to-cart=' switch with an already existing cart
[Issue #000217].

View File

@@ -1090,8 +1090,6 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
}
if(*cartnum==0) {
*cartnum=effective_group->nextFreeCart();
}
if(*cartnum==0) {
PrintLogDateTime(stderr);
fprintf(stderr,"rdimport: no free carts available in specified group\n");
fflush(stderr);
@@ -1114,8 +1112,13 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
if(import_delete_cuts) {
DeleteCuts(import_cart_number);
}
if(RDCart::exists(*cartnum)) {
cart_created=false;
}
else {
cart_created=
RDCart::create(effective_group->name(),RDCart::Audio,&err_msg,*cartnum)!=0;
}
RDCart *cart=new RDCart(*cartnum);
int cutnum=
cart->addCut(import_format,import_bitrate,import_channels);