mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Android: ensure that temp directory exists before returning a path to it.
This fixes “no such file or directory” error when calling open() for a file for which parent directory does not exist.
This commit is contained in:
parent
9b687968db
commit
f0ada66b0f
1 changed files with 5 additions and 1 deletions
|
|
@ -105,7 +105,11 @@ File File::getSpecialLocation (const SpecialLocationType type)
|
|||
return File ("/system/app");
|
||||
|
||||
case tempDirectory:
|
||||
return File (android.appDataDir).getChildFile (".temp");
|
||||
{
|
||||
File tmp = File (android.appDataDir).getChildFile (".temp");
|
||||
tmp.createDirectory();
|
||||
return File (tmp.getFullPathName());
|
||||
}
|
||||
|
||||
case invokedExecutableFile:
|
||||
case currentExecutableFile:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue