Skip to content

FIX ios bug : You don’t have permission to save the file “Documents_temp” #19693

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

Merged
merged 3 commits into from
May 17, 2019

Conversation

yangyp-yes
Copy link

The iOS side, eg:Writable directory is **/Documents/,old code will get **/Documents_temp/, However, due to the sandbox mechanism of iOS, you do not have the permission of this directory, so instead fixed it to **/Documents/_temp/

…emp”

The iOS side, eg:Writable directory is "**/Documents/",old code will get "**/Documents_temp/", However, due to the sandbox mechanism of iOS, you do not have the permission of this directory, so instead fixed it to  "**/Documents/_temp/"
FIX ios bug : You don’t have permission to save the file “Documents_t…
@yangyp-yes
Copy link
Author

forum link

@yangyp-yes
Copy link
Author

apple link

@yangyp-yes yangyp-yes changed the title FIX ios bug : You don’t have permission to save the file “Documents_t… … …emp” FIX ios bug : You don’t have permission to save the file “Documents_temp” May 10, 2019
@@ -314,7 +314,8 @@ void AssetsManagerEx::setStoragePath(const std::string& storagePath)
_fileUtils->createDirectory(_storagePath);

_tempStoragePath = _storagePath;
_tempStoragePath.insert(_storagePath.size() - 1, TEMP_PACKAGE_SUFFIX);
_tempStoragePath.insert(_storagePath.size(), TEMP_PACKAGE_SUFFIX);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then use string::append is better? And change TEMP_PACKAGE_SUFFIX to temp is better too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed!

@minggo minggo merged commit 415ae3a into cocos2d:v3 May 17, 2019
@minggo minggo added this to the next milestone May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants