OpenToonz - An open-source full-featured 2D animation creation software
C
check folder access on save level (#2334)
shun-iwasawaf889997cee1a
diff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cppindex c4f7af0f7..b22ae3553 100644--- a/toonz/sources/toonzlib/txshsimplelevel.cpp+++ b/toonz/sources/toonzlib/txshsimplelevel.cpp@@ -1391,7 +1391,10 @@ void TXshSimpleLevel::save(const TFilePath &fp, const TFilePath &oldFp,(!oldFp.isEmpty()) ? oldFp : getScene()->decodeFilePath(m_path);TFilePath dDstPath = getScene()->decodeFilePath(fp);- TSystem::touchParentDir(dDstPath);+ if (!TSystem::touchParentDir(dDstPath))+ throw TSystemException(+ dDstPath,+ "The level cannot be saved: failed to access the target folder.");// backupif (Preferences::instance()->isLevelsBackupEnabled() &&