Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit dcfa832

Browse files
author
rjmatthews62
committed
Fix to 'file not found' on first install.
1 parent 3ef3cf2 commit dcfa832

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

android/ScriptingLayerForAndroid/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.googlecode.android_scripting" android:installLocation="auto"
4-
android:versionCode="602" android:versionName="6x02">
4+
android:versionCode="603" android:versionName="6x03">
55
<uses-permission android:name="android.permission.RECEIVE_SMS" />
66
<uses-permission android:name="net.dinglisch.android.tasker.PERMISSION_RUN_TASKS" />
77
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

android/ScriptingLayerForAndroid/src/com/googlecode/android_scripting/activity/ScriptManager.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ public void onCreate(Bundle savedInstanceState) {
113113
super.onCreate(savedInstanceState);
114114
CustomizeWindow.requestCustomTitle(this, "Scripts", R.layout.script_manager);
115115
if (FileUtils.externalStorageMounted()) {
116+
File sl4a = mBaseDir.getParentFile();
117+
if (!sl4a.exists()) {
118+
sl4a.mkdir();
119+
try {
120+
FileUtils.chmod(sl4a, 0755); // Handle the sl4a parent folder first.
121+
} catch (Exception e) {
122+
// Not much we can do here if it doesn't work.
123+
}
124+
}
116125
if (!FileUtils.makeDirectories(mBaseDir, 0755)) {
117126
new AlertDialog.Builder(this)
118127
.setTitle("Error")

0 commit comments

Comments
 (0)