From 97869c32f8f2a6dd2998f5ccd84d8c23c068e098 Mon Sep 17 00:00:00 2001 From: justburner Date: May 09 2023 06:50:05 +0000 Subject: Changed QtDir.mkdir to QtDir.mkpath because it failed to create layers folder on Linux platform, also errors now close the progress bar and report the issue in a message dialog. --- diff --git a/toonz/sources/toonz/ocaio.cpp b/toonz/sources/toonz/ocaio.cpp index a626077..75a0ea3 100644 --- a/toonz/sources/toonz/ocaio.cpp +++ b/toonz/sources/toonz/ocaio.cpp @@ -483,12 +483,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; } } @@ -498,6 +500,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; }