1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| | diff -ruN ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c ./native/jni/java-io/java_io_VMFile.c
--- ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c 2006-09-23 08:17:45.000000000 +0300
+++ ./native/jni/java-io/java_io_VMFile.c 2021-09-03 01:08:17.073644627 +0300
@@ -278,6 +278,7 @@
const char *filename;
int result;
jint entryType;
+ int fres;
/* Don't use the JCL convert function because it throws an exception
on failure */
@@ -288,9 +289,22 @@
}
result = cpio_checkType (filename, &entryType);
+
+ fres = 1;
+
+ if (result != CPNATIVE_OK)
+ {
+ fres = 0;
+ }
+
+ if (entryType != CPFILE_FILE)
+ {
+ fres = 0;
+ }
+
(*env)->ReleaseStringUTFChars (env, name, filename);
- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0;
+ return fres;
#else /* not WITHOUT_FILESYSTEM */
return 0;
#endif /* not WITHOUT_FILESYSTEM */
|