Index: core/src/org/netbeans/core/upgrade/CopyUtil.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/upgrade/CopyUtil.java,v retrieving revision 1.12 diff -u -u -r1.12 CopyUtil.java --- core/src/org/netbeans/core/upgrade/CopyUtil.java 10 Jan 2002 15:22:10 -0000 1.12 +++ core/src/org/netbeans/core/upgrade/CopyUtil.java 28 Feb 2002 13:54:48 -0000 @@ -271,7 +271,11 @@ } else { subTargetFo = destFolder.getFileObject(subSourceFo.getNameExt()); if (subTargetFo == null) { - subTargetFo = FileUtil.copyFile(subSourceFo, destFolder, subSourceFo.getName(), subSourceFo.getExt()); + if ( Utilities.getOperatingSystem () == Utilities.OS_VMS + && subSourceFo.getNameExt ().equalsIgnoreCase ( "_nbattrs.") ) + subTargetFo = FileUtil.copyFile(subSourceFo, destFolder, subSourceFo.getNameExt(), subSourceFo.getExt()); + else + subTargetFo = FileUtil.copyFile(subSourceFo, destFolder, subSourceFo.getName(), subSourceFo.getExt()); } copyAttributes(subSourceFo,subTargetFo); } @@ -314,12 +318,18 @@ recursiveCopyWithFilter (subSourceFo, subTargetFo, noCopy, basicTime); } else { subTargetFo = dest.getFileObject (subSourceFo.getName (), subSourceFo.getExt ()); + if (subTargetFo != null) { FileLock lock = subTargetFo.lock (); subTargetFo.delete (lock); lock.releaseLock (); - } - subTargetFo = FileUtil.copyFile (subSourceFo, dest, subSourceFo.getName ()); + } + + if ( Utilities.getOperatingSystem () == Utilities.OS_VMS + && subSourceFo.getNameExt ().equalsIgnoreCase ( "_nbattrs.") ) + subTargetFo = FileUtil.copyFile (subSourceFo, dest, subSourceFo.getNameExt ()); + else + subTargetFo = FileUtil.copyFile (subSourceFo, dest, subSourceFo.getName ()); copyAttributes (subSourceFo, subTargetFo); } } Index: openide/src/org/openide/filesystems/DefaultAttributes.java =================================================================== RCS file: /cvs/openide/src/org/openide/filesystems/DefaultAttributes.java,v retrieving revision 1.53 diff -u -u -r1.53 DefaultAttributes.java --- openide/src/org/openide/filesystems/DefaultAttributes.java 10 Jan 2002 15:22:20 -0000 1.53 +++ openide/src/org/openide/filesystems/DefaultAttributes.java 28 Feb 2002 13:54:49 -0000 @@ -153,15 +153,16 @@ int size = arr.length; + if (size == 1) { // In NB 3.2.x for OpenVMS, we had to use "_nbattrs." as a attribute file. // However, OpenVMS now supports a file name beginning with "." - // So we now have to change the existing "_nbattrs." file into ".nbattrs" + // So we now have to copy the existing "_nbattrs." file into ".nbattrs" // if (Utilities.getOperatingSystem () == Utilities.OS_VMS && arr[0] != null && f != null) { if (arr[0].equalsIgnoreCase ("_nbattrs.")) { try { - renameVMSAttrFile (f); + change.delete(f+"/"+arr[0]); // NOI18N } catch (IOException ioe) {} arr[0] = new String (ATTR_NAME_EXT_XML); } @@ -178,12 +179,16 @@ for (int i = 0; i < size; i++) { // In NB 3.2.x for OpenVMS, we had to use "_nbattrs." as a attribute file. // However, OpenVMS now supports a file name beginning with "." - // So we now have to change the existing "_nbattrs." file into ".nbattrs" + // So we now have to copy the existing "_nbattrs." file into ".nbattrs" // if (Utilities.getOperatingSystem () == Utilities.OS_VMS && arr[i] != null && f != null) { if (arr[i].equalsIgnoreCase ("_nbattrs.")) { try { - renameVMSAttrFile (f); + File fp = new File (f+"/"+".nbattrs"); + if ( ! fp.exists() ) { + cache = null; + copyVMSAttrFile (f); + } } catch (IOException ioe) {} arr[i] = new String (ATTR_NAME_EXT_XML); } @@ -207,11 +212,12 @@ * * @param f the folder containg the attribute file */ - private void renameVMSAttrFile (String f) throws IOException { + private void copyVMSAttrFile (String f) throws IOException { InputStream is = null; OutputStream os = null; - try { + try { + change.createData (f+"/"+ATTR_NAME_EXT_XML); is = info.inputStream (f+"/"+"_nbattrs."); os = info.outputStream (f+"/"+ATTR_NAME_EXT_XML); @@ -223,7 +229,7 @@ } is.close (); - change.delete (f+"/"+"_nbattrs."); + //change.delete (f+"/"+"_nbattrs."); is = null; } catch (IOException ie) { } finally {