[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources UniversalFileTransferUtility.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources
In directory dev2:/tmp/cvs-serv18221/src/org/eclipse/rse/files/ui/resources

Modified Files:
      Tag: R3_2_maintenance
	UniversalFileTransferUtility.java 
Log Message:
[386486] when the original timestamp of a file is 0 don't set it after an upload


Index: UniversalFileTransferUtility.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java,v
retrieving revision 1.109.2.1
retrieving revision 1.109.2.2
diff -C2 -d -r1.109.2.1 -r1.109.2.2
*** UniversalFileTransferUtility.java	10 Apr 2012 17:41:39 -0000	1.109.2.1
--- UniversalFileTransferUtility.java	3 Aug 2012 14:46:33 -0000	1.109.2.2
***************
*** 63,66 ****
--- 63,67 ----
   * David McKnight     (IBM)      - [311218] Content conflict dialog pops up when it should not
   * David McKnight     (IBM)      - [376410] cross-system copy/paste operation doesn't transfer remote encodings for binary files
+  * David McKnight     (IBM)      - [386486] when the original timestamp of a file is 0 don't set it after an upload
   *******************************************************************************/
  
***************
*** 1761,1770 ****
  						{
  							SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
! 							try {
! 								targetFS.setLastModified(newFile, properties.getRemoteFileTimeStamp(), monitor);						
! 							}
! 							catch (SystemUnsupportedOperationException e){
! 								// service doesn't support setLastModified
! 								SystemBasePlugin.logError("Unable to set last modified", e); //$NON-NLS-1$
  							}
  						}
--- 1762,1774 ----
  						{
  							SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
! 							long ts = properties.getRemoteFileTimeStamp();
! 							if (ts != 0){ // don't set 0 timestamp
! 								try {
! 									targetFS.setLastModified(newFile, properties.getRemoteFileTimeStamp(), monitor);						
! 								}
! 								catch (SystemUnsupportedOperationException e){
! 									// service doesn't support setLastModified
! 									SystemBasePlugin.logError("Unable to set last modified", e); //$NON-NLS-1$
! 								}
  							}
  						}
***************
*** 2018,2027 ****
  						timestamp = srcFileOrFolder.getLocalTimeStamp();
  
! 					try {
! 						targetFS.setLastModified(copiedFile, timestamp, monitor);
! 					}
! 					catch (SystemUnsupportedOperationException e){
! 						// service doesn't support setLastModified
! 						SystemBasePlugin.logError("Unable to set last modified", e); //$NON-NLS-1$
  					}
  	  		    }
--- 2022,2033 ----
  						timestamp = srcFileOrFolder.getLocalTimeStamp();
  
! 					if (timestamp != 0){ // don't set 0 timestamps
! 						try {
! 							targetFS.setLastModified(copiedFile, timestamp, monitor);
! 						}
! 						catch (SystemUnsupportedOperationException e){
! 							// service doesn't support setLastModified
! 							SystemBasePlugin.logError("Unable to set last modified", e); //$NON-NLS-1$
! 						}
  					}
  	  		    }
***************
*** 2261,2265 ****
  			SystemIFileProperties properties = new SystemIFileProperties(source);
  			try {
! 				target.getParentRemoteFileSubSystem().setLastModified(target, properties.getRemoteFileTimeStamp(), monitor);
  			}
  			catch (SystemUnsupportedOperationException e){
--- 2267,2274 ----
  			SystemIFileProperties properties = new SystemIFileProperties(source);
  			try {
! 				long ts = properties.getRemoteFileTimeStamp();
! 				if (ts != 0){ // don't set 0 timestamps
! 					target.getParentRemoteFileSubSystem().setLastModified(target, ts, monitor);
! 				}
  			}
  			catch (SystemUnsupportedOperationException e){