Author: rob.stryker(a)jboss.com
Date: 2012-05-14 03:04:57 -0400 (Mon, 14 May 2012)
New Revision: 40976
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
Log:
JBIDE-7333 to trunk / cr1
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-05-14
02:09:47 UTC (rev 40975)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-05-14
07:04:57 UTC (rev 40976)
@@ -343,7 +343,7 @@
}
IStatus[] errors2 = ModelTruezipBridge.copyFiles(matchingFilesets[j],
matchingFilesets[j].getMatches(globalPath),
- new NullProgressMonitor(), true);
+ new NullProgressMonitor(), true, true);
errors.addAll(Arrays.asList(errors2));
}
EventManager.fileUpdated(path, matchingFilesets);
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2012-05-14
02:09:47 UTC (rev 40975)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2012-05-14
07:04:57 UTC (rev 40976)
@@ -60,7 +60,7 @@
}
public static FileWrapperStatusPair fullFilesetBuild(final IArchiveFileSet fileset,
IProgressMonitor monitor, boolean sync) {
FileWrapper[] files = fileset.findMatchingPaths();
- IStatus[] s = copyFiles(fileset, files, monitor, false);
+ IStatus[] s = copyFiles(fileset, files, monitor, false, false);
if( sync )
TrueZipUtil.sync();
return new FileWrapperStatusPair( files, s );
@@ -130,14 +130,14 @@
return new FileWrapperStatusPair( files2, errorsArr);
}
- public static IStatus[] copyFiles(IArchiveFileSet fileset, final FileWrapper[] files,
IProgressMonitor monitor, boolean sync) {
+ public static IStatus[] copyFiles(IArchiveFileSet fileset, final FileWrapper[] files,
IProgressMonitor monitor, boolean updateTimestamps, boolean sync) {
monitor.beginTask(ArchivesCore.bind(ArchivesCoreMessages.CopyingCountFiles,
new Integer(files.length).toString()), files.length * 100);
boolean b = true;
ArrayList<IStatus> list = new ArrayList<IStatus>();
final File[] destFiles = getFiles(files, fileset);
for( int i = 0; i < files.length; i++ ) {
- b = TrueZipUtil.copyFile(files[i].getAbsolutePath(), destFiles[i]);
+ b = TrueZipUtil.copyFile(files[i].getAbsolutePath(), destFiles[i], updateTimestamps);
if( b == false ) {
list.add(new Status(IStatus.ERROR, ArchivesCore.PLUGIN_ID,
ArchivesCore.bind(ArchivesCoreMessages.FileCopyFailed,
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-05-14
02:09:47 UTC (rev 40975)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-05-14
07:04:57 UTC (rev 40976)
@@ -52,13 +52,13 @@
public static boolean copyFile(String source, IPath dest) throws IOException {
- return copyFile(source, getFile(dest));
+ return copyFile(source, getFile(dest), true);
}
- public static boolean copyFile(String source, de.schlichtherle.io.File file) {
+ public static boolean copyFile(String source, de.schlichtherle.io.File file, boolean
updateTimestamps) {
file.getParentFile().mkdirs();
boolean b = new de.schlichtherle.io.File(source,
ArchiveDetector.NULL).archiveCopyAllTo(file);
- return b && updateParentTimestamps(file);
+ return b && (updateTimestamps ? updateParentTimestamps(file) : true);
}
public static boolean touchFile(IPath path) {