From: Robert Schuster Date: Fri, 5 Dec 2008 11:30:31 +0000 (+0100) Subject: midpath-core 0.2+0.3rc2: Updated fix-openfile patch to what was committed upstream. X-Git-Tag: Release-2010-05/1~4925 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fd3e409aa0b309a279a3c10f068e88703fbe48c;p=openembedded.git midpath-core 0.2+0.3rc2: Updated fix-openfile patch to what was committed upstream. --- 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"