cvs -q diff -u Index: JarChildren.java =================================================================== RCS file: /cvs/jarpackager/src/org/netbeans/modules/jarpackager/JarChildren.java,v retrieving revision 1.9.14.1.4.1 diff -u -r1.9.14.1.4.1 JarChildren.java --- JarChildren.java 4 Apr 2002 12:04:14 -0000 1.9.14.1.4.1 +++ JarChildren.java 15 Apr 2002 13:13:19 -0000 @@ -279,23 +279,33 @@ } public Transferable paste() { // System.out.println("do paste stuff here!!"); - - FileLock lock=null; try { - FileInputStream is = new FileInputStream(generatedJar); - FileObject tf = FileUtil.createData(target,generatedJar.getName()); - lock = tf.lock(); - OutputStream os = tf.getOutputStream(lock); - FileUtil.copy(is,os); - lock.releaseLock(); - return null; + FileSystem fs = target.getFileSystem(); + fs.runAtomicAction (new FileSystem.AtomicAction () { + public void run () throws IOException { + FileLock lock=null; + try { + FileInputStream is = new FileInputStream(generatedJar); + FileObject tf = FileUtil.createData(target,generatedJar.getName()); + lock = tf.lock(); + OutputStream os = tf.getOutputStream(lock); + FileUtil.copy(is,os); + lock.releaseLock(); + //return null; + } + catch (IOException ioe) { + TopManager.getDefault().getErrorManager().notify(ErrorManager.INFORMATIONAL, ioe); + } + finally { + if (lock!=null) + lock.releaseLock(); + } + //return null; + } + }); // end of AtomicAction } - catch (java.io.IOException ioe) { - ioe.printStackTrace(); - } - finally { - if (lock!=null) - lock.releaseLock(); + catch (IOException ioe) { + TopManager.getDefault().getErrorManager().notify(ErrorManager.INFORMATIONAL, ioe); } return null; } *****CVS exited normally with code 1*****