mirror of
https://github.com/AdAstra-LD/DS-Pokemon-Rom-Editor.git
synced 2026-09-12 13:15:20 -05:00
Handling of non-empty dir (Apicula DAE export)
This commit is contained in:
@@ -116,6 +116,20 @@ namespace DSPRE {
|
||||
}
|
||||
|
||||
string outDir = Path.Combine(cofd.FileName, modelName);
|
||||
|
||||
if (Directory.Exists(outDir)) {
|
||||
if(Directory.GetFiles(outDir).Length > 0) {
|
||||
DialogResult d = MessageBox.Show($"Directory \"{outDir}\" already exists and is not empty.\nIts contents will be lost.\n\nDo you want to proceed?", "Directory not empty", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
|
||||
if (d.Equals(DialogResult.No)) {
|
||||
return;
|
||||
} else {
|
||||
Directory.Delete(outDir, recursive: true);
|
||||
}
|
||||
} else {
|
||||
Directory.Delete(outDir, recursive: true);
|
||||
}
|
||||
}
|
||||
string tempNSBMDPath = outDir + "_temp.nsbmd";
|
||||
|
||||
if (textureData != null && textureData.Length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user