diff --git a/toonz/sources/toonz/ocaio.cpp b/toonz/sources/toonz/ocaio.cpp index e3692cd..51e5dc7 100644 --- a/toonz/sources/toonz/ocaio.cpp +++ b/toonz/sources/toonz/ocaio.cpp @@ -479,12 +479,14 @@ void ExportOCACommand::execute() { QDir saveDir(ocafolder); if (!saveFile.open(QIODevice::WriteOnly)) { - qWarning("Couldn't open save file."); + progressDialog->close(); + DVGui::error(QObject::tr("Unable to open OCA file for saving.")); return; } if (!saveDir.exists()) { - if (!saveDir.mkdir(".")) { - qWarning("Couldn't create folder."); + if (!saveDir.mkpath(".")) { + progressDialog->close(); + DVGui::error(QObject::tr("Unable to create folder for saving layers.")); return; } } @@ -494,6 +496,7 @@ void ExportOCACommand::execute() { ocaData.build(scene, xsheet, QString::fromStdString(fp.getName()), ocafolder, frameOffset, exrImageFmt, !rasterVecs); if (ocaData.isEmpty()) { + progressDialog->close(); DVGui::error(QObject::tr("No columns can be exported.")); return; }