OpenToonz - An open-source full-featured 2D animation creation software
C
Remove Function createFolder
Abel You7f39ada441d5
diff --git a/toonz/sources/toonz/exportalllevelspopup.cpp b/toonz/sources/toonz/exportalllevelspopup.cppindex 3d6cb87fc..691c15e32 100644--- a/toonz/sources/toonz/exportalllevelspopup.cpp+++ b/toonz/sources/toonz/exportalllevelspopup.cpp@@ -243,7 +243,14 @@ bool ExportAllLevelsPopup::execute() {// if Need to Create Folderif (createFolder) {FilePath = FolderPath + level_to_foldername.find(sl->getName())->second;- m_browser->createFolder(FilePath);+ try {+ TSystem::mkDir(FilePath);++ } catch (...) {+ DVGui::error(tr("It is not possible to create the %1 folder.")+ .arg(toQString(FilePath)));+ return false;+ }}ret = IoCmd::exportLevel(TFilePath(FilePath.getWideString() + L"\\" + level_to_foldername.find(sl->getName())->second)@@ -279,7 +286,14 @@ bool ExportAllLevelsPopup::execute() {// if Need to Create Folderif (createFolder) {FilePath = FolderPath + m_nameField->text().toStdWString();- m_browser->createFolder(FilePath);+ try {+ TSystem::mkDir(FilePath);++ } catch (...) {+ DVGui::error(tr("It is not possible to create the %1 folder.")+ .arg(toQString(FilePath)));+ return false;+ }}TXshSimpleLevel *sl = outputLevels.back()->getSimpleLevel();diff --git a/toonz/sources/toonz/exportlevelpopup.cpp b/toonz/sources/toonz/exportlevelpopup.cppindex 7891d40c3..0854f1ab4 100644--- a/toonz/sources/toonz/exportlevelpopup.cpp+++ b/toonz/sources/toonz/exportlevelpopup.cpp@@ -41,6 +41,7 @@// TnzCore includes#include "tiio.h"#include "tproperty.h"+#include <tsystem.h>// Qt includes#include <QDir>@@ -645,7 +646,14 @@ bool ExportLevelPopup::execute() {TFilePath(FolderPath.getWideString() + L"\\" + sl->getName());// if Need to Create Folderif (createFolder) {- m_browser->createFolder(FilePath);+ try {+ TSystem::mkDir(FilePath);++ } catch (...) {+ DVGui::error(tr("It is not possible to create the %1 folder.")+ .arg(toQString(FilePath)));+ return false;+ }FilePath = TFilePath(FilePath.getWideString() + L"\\" + sl->getName()).withType(ext).withFrame(tmplFId);@@ -672,7 +680,14 @@ bool ExportLevelPopup::execute() {return false;if (createFolder) {- m_browser->createFolder(FolderPath);+ try {+ TSystem::mkDir(FilePath);++ } catch (...) {+ DVGui::error(tr("It is not possible to create the %1 folder.")+ .arg(toQString(FilePath)));+ return false;+ }}FilePath =TFilePath(FolderPath.getWideString() + L"\\" +