Author: rob.stryker(a)jboss.com
Date: 2009-04-22 01:39:52 -0400 (Wed, 22 Apr 2009)
New Revision: 14840
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java
Log:
JBIDE-4156
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java 2009-04-21
18:33:28 UTC (rev 14839)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java 2009-04-22
05:39:52 UTC (rev 14840)
@@ -69,6 +69,8 @@
IPath tempDestFolder = new Path(server.getTempDeployFolder());
File tempDestFile = tempDestFolder.append(sourcePath.lastSegment()).toFile();
File destFile = destFolder.append(sourcePath.lastSegment()).toFile();
+ if( destFile.exists())
+ destFile.delete();
FileUtilListener l = new FileUtilListener();
FileUtil.fileSafeCopy(sourcePath.toFile(), tempDestFile, l);
boolean success = tempDestFile.renameTo(destFile);