Ensure exists directory

This commit is contained in:
M66B
2022-10-06 14:43:44 +02:00
parent bdfb324441
commit ff0f2e9ec0
12 changed files with 39 additions and 62 deletions

View File

@@ -1108,11 +1108,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
? context.getExternalFilesDir(null)
: context.getFilesDir());
source = new File(source, "attachments");
target = new File(target, "attachments");
source.mkdirs();
target.mkdirs();
source = Helper.ensureExists(new File(source, "attachments"));
target = Helper.ensureExists(new File(target, "attachments"));
File[] attachments = source.listFiles();
if (attachments != null)