diff options
author | Robert Schuster <thebohemian@gmx.net> | 2008-12-05 12:30:31 +0100 |
---|---|---|
committer | Robert Schuster <thebohemian@gmx.net> | 2008-12-05 12:30:31 +0100 |
commit | 5fd3e409aa0b309a279a3c10f068e88703fbe48c (patch) | |
tree | f7289d8ed076d8803220fd6b21f230ad3a77653e /packages/midpath | |
parent | d7afe2429ffcbdc591ac26077030f9e29f5b4c87 (diff) |
midpath-core 0.2+0.3rc2: Updated fix-openfile patch to what was committed upstream.
Diffstat (limited to 'packages/midpath')
-rw-r--r-- | packages/midpath/files/fix-openfile.patch | 21 | ||||
-rw-r--r-- | packages/midpath/midpath-core_0.2+0.3rc2.bb | 2 |
2 files changed, 16 insertions, 7 deletions
diff --git a/packages/midpath/files/fix-openfile.patch b/packages/midpath/files/fix-openfile.patch index 6b9b8be237..392364b3e3 100644 --- a/packages/midpath/files/fix-openfile.patch +++ b/packages/midpath/files/fix-openfile.patch @@ -1,13 +1,22 @@ Index: midpath-0.3rc2/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java =================================================================== --- midpath-0.3rc2.orig/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java 2008-12-04 21:10:39.000000000 +0100 -+++ midpath-0.3rc2/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java 2008-12-04 21:12:11.000000000 +0100 -@@ -182,7 +182,7 @@ ++++ midpath-0.3rc2/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java 2008-12-05 12:29:47.000000000 +0100 +@@ -181,10 +181,13 @@ +
public void openForRead() throws IOException {
if (randomAccessFile == null) {
- //stream = new FileRandomAccessStream(file);
+- //stream = new FileRandomAccessStream(file);
- randomAccessFile = new RandomAccessFile(file, "rws");
-+ randomAccessFile = new RandomAccessFile(file, "r");
- }
- }
+- }
+- }
++ // Try to get maximum rights to avoid closing the stream if openForWrite is called next
++ if (file.canWrite()) {
++ randomAccessFile = new RandomAccessFile(file, "rws");
++ } else {
++ randomAccessFile = new RandomAccessFile(file, "r");
++ }
++ }
+ public void openForWrite() throws IOException {
+ if (randomAccessFile == null) {
diff --git a/packages/midpath/midpath-core_0.2+0.3rc2.bb b/packages/midpath/midpath-core_0.2+0.3rc2.bb index d4d6b6b939..ec3291ce32 100644 --- a/packages/midpath/midpath-core_0.2+0.3rc2.bb +++ b/packages/midpath/midpath-core_0.2+0.3rc2.bb @@ -1,6 +1,6 @@ DESCRIPTION = "MIDPath is a Java library which provides a MIDP2 implementation" -PR = "r1" +PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc2.tar.gz" |