-
-
Notifications
You must be signed in to change notification settings - Fork 20.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When exporting an iOS Project will delete source code #89715
Comments
iOS exporter deletes |
We could for example search for a project file in the path, but it'd still be risky, as it could be in any nested folder, unsure how it could be done reliably, alternatively we could reqire that the folder is either empty (or does not exist) or contains some specific data from exporting This is the relevant code: godot/platform/ios/export/export_plugin.cpp Lines 1629 to 1643 in fe01776
We could also make the binary dir have some suffix making it unlikely to match your project directory in the case you name the binary the same We could also enforce the export happening in specific places as well |
This code actually is broken and will delete it only if there's no if (da->change_dir(binary_dir + ".xcodeproj") == OK) { // enters dest/binary_dir.xcodeproj
da->erase_contents_recursive();
}
if (da->change_dir(binary_dir) == OK) { // if previous changedir was sucessfull, enters dest/binary_dir.xcodeproj/binary_dir which will not exist
da->erase_contents_recursive();
} |
Tested versions
System information
Godot v4.2.1.stable - macOS 13.6.5 - Vulkan (Forward+) - integrated Intel(R) Iris(TM) Plus Graphics 655 - Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz (8 Threads)
Issue description
when exporting an iOS Project to the exists directory parent, it will be remove it directly.
my all code is lost because of this!!!!
expect any warning or confirm or somethink.
Steps to reproduce
/xxx/project/mygame
/xxx/project/
Minimal reproduction project (MRP)
The text was updated successfully, but these errors were encountered: