Android: always touch the file (appropriately)

This commit is contained in:
Ender's Games 2018-08-02 19:27:25 -04:00
parent 21b1b21aa5
commit 869cc5649a
1 changed files with 1 additions and 1 deletions

View File

@ -196,6 +196,7 @@ public class FileBrowser extends Fragment {
buttons = new File(theme);
}
File file = new File(home_directory, "data/buttons.png");
org.apache.commons.io.FileUtils.touch(file);
if (buttons != null && buttons.exists()) {
InputStream in = new FileInputStream(buttons);
OutputStream out = new FileOutputStream(file);
@ -209,7 +210,6 @@ public class FileBrowser extends Fragment {
in.close();
out.close();
} else if (!file.exists()) {
org.apache.commons.io.FileUtils.touch(file);
InputStream png = getActivity().getAssets().open("buttons.png");
OutputStream fo = new FileOutputStream(file);
byte[] buffer = new byte[4096];