? diff.log Index: AbstractFileObject.java =================================================================== RCS file: /cvs/openide/src/org/openide/filesystems/AbstractFileObject.java,v retrieving revision 1.83.2.2 diff -u -r1.83.2.2 AbstractFileObject.java --- AbstractFileObject.java 1 Apr 2003 08:22:05 -0000 1.83.2.2 +++ AbstractFileObject.java 23 Apr 2003 15:02:27 -0000 @@ -217,11 +217,17 @@ /** Unlocks the file. Notifies the underlaying impl. */ - synchronized void unlock () { - getAbstractFileSystem ().info.unlock (getPath ()); - lastModified = null; - // clear my lock - lock = null; + synchronized void unlock (FileLock fLock) { + FileLock currentLock = null; + if (lock != null) { + currentLock = (FileLock)lock.get(); + } + if (currentLock == fLock) { + getAbstractFileSystem ().info.unlock (getPath ()); + lastModified = null; + // clear my lock + lock = null; + } } /** Tests the lock if it is valid, if not throws exception. @@ -793,7 +799,7 @@ public void releaseLock () { if (this.isValid()) { super.releaseLock(); - unlock (); + unlock (this); } } }