8000 Fixed filepath getting in PythonUtil.java · kived/python-for-android@dedfc89 · GitHub
[go: up one dir, main page]

Skip to content

Commit dedfc89

Browse files
committed
Fixed filepath getting in PythonUtil.java
1 parent 4abb4d2 commit dedfc89

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonUtil.java

Lines changed: 6 additions & 3 deletions
< 394C td data-grid-cell-id="diff-f701b87cc57cb0e5be36adea83c35de63a9ce467e1a0967051fa56f7f04b615f-50-53-2" data-line-anchor="diff-f701b87cc57cb0e5be36adea83c35de63a9ce467e1a0967051fa56f7f04b615fR53" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">
}
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ protected static String[] getLibraries() {
1919
}
2020

2121
public static void loadLibraries(File filesDir) {
22+
23+
String filesDirPath = filesDir.getAbsolutePath();
24+
2225
for (String lib : getLibraries()) {
2326
System.loadLibrary(lib);
2427
}
@@ -36,15 +39,15 @@ public static void loadLibraries(File filesDir) {
3639
}
3740

3841
try {
39-
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_io.so");
40-
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/unicodedata.so");
42+
System.load(filesDirPath + "/lib/python2.7/lib-dynload/_io.so");
43+
System.load(filesDirPath + "/lib/python2.7/lib-dynload/unicodedata.so");
4144
} catch(UnsatisfiedLinkError e) {
4245
Log.v(TAG, "Failed to load _io.so or unicodedata.so...but that's okay.");
4346
}
4447

4548
try {
4649
// System.loadLibrary("ctypes");
47-
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_ctypes.so");
50+
System.load(filesDirPath + "/lib/python2.7/lib-dynload/_ctypes.so");
4851
} catch(UnsatisfiedLinkError e) {
4952
Log.v(TAG, "Unsatisfied linker when loading ctypes");
5053

0 commit comments

Comments
 (0)
0