<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
>
<!-- MHonArc v2.6.10 -->
	<channel>
		<title>tm-cvs-commit</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/maillist.html</link>
		<description>tm-cvs-commit</description>
		<language>en-us</language>
		<pubDate>Tue, 16 Oct 2012 21:40:22 GMT</pubDate>
		<lastBuildDate>Tue, 16 Oct 2012 21:40:22 GMT</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>MHonArc RSS 2.0 RCFile</generator>
		<managingEditor>webmaster@eclipse.org (Webmaster)</managingEditor>
		<webMaster>webmaster@eclipse.org (Webmaster)</webMaster>
		<image>
			<title>tm-cvs-commit</title>
			<url>http://www.eclipse.org/eclipse.org-common/themes/Phoenix/images/eclipse_home_header.jpg</url>
			<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/maillist.html</link>
		</image>
 

	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/releng/org.eclipse.rse.build/maps rse.map</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01780.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/releng/org.eclipse.rse.build/maps In directory dev2:/tmp/cvs-serv5859/maps Modified Files: Tag: R3_2_maintenance rse.map Log Message: Index: rse.map ===============================================================...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/releng/org.eclipse.rse.build/maps
In directory dev2:/tmp/cvs-serv5859/maps

Modified Files:
      Tag: R3_2_maintenance
	rse.map 
Log Message:


Index: rse.map
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/releng/org.eclipse.rse.build/maps/Attic/rse.map,v
retrieving revision 1.395.2.123
retrieving revision 1.395.2.124
diff -C2 -d -r1.395.2.123 -r1.395.2.124
*** rse.map	5 Oct 2012 19:49:41 -0000	1.395.2.123
--- rse.map	16 Oct 2012 21:35:24 -0000	1.395.2.124
***************
*** 15,19 ****
  !!feature@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=v20080609a,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/features/org.eclipse.rse.useractions.wrapper-feature
  !!feature@xxxxxxxxxxxxxxxxxxxxxxxxxxxx=v20080609,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/releng/org.eclipse.tm.releng.master-feature
! plugin@xxxxxxxxxxxxxxxxxxxxxxx=R32x_v201210032108,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.core
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxx=v201005221130,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/doc/org.eclipse.dstore.doc.isv
  plugin@xxxxxxxxxxxxxxxxxxxxxxxx=v200907301400,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.extra
--- 15,19 ----
  !!feature@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=v20080609a,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/features/org.eclipse.rse.useractions.wrapper-feature
  !!feature@xxxxxxxxxxxxxxxxxxxxxxxxxxxx=v20080609,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/releng/org.eclipse.tm.releng.master-feature
! plugin@xxxxxxxxxxxxxxxxxxxxxxx=R32x_v201210162135,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.core
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxx=v201005221130,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/doc/org.eclipse.dstore.doc.isv
  plugin@xxxxxxxxxxxxxxxxxxxxxxxx=v200907301400,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.extra
***************
*** 35,39 ****
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx=v201003010830,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
  plugin@xxxxxxxxxxxxxxxxxxx=R32x_v201102011435,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
! plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=R32x_v201210051950,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=v201004072040,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=R32x_v201105271758,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
--- 35,39 ----
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx=v201003010830,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
  plugin@xxxxxxxxxxxxxxxxxxx=R32x_v201102011435,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
! plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=R32x_v201210162135,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=v201004072040,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
  plugin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=R32x_v201105271758,:pserver:anonymous:none@xxxxxxxxxxxxxxx:/cvsroot/tools,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 21:35:26 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01780.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/META-INF	MANIFEST.MF</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01779.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/META-INF In directory dev2:/tmp/cvs-serv3495/META-INF Modified Files: Tag: R3_2_maintenance MANIFEST.MF Log Message: update version Index: MANIFEST.MF =====================...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/META-INF
In directory dev2:/tmp/cvs-serv3495/META-INF

Modified Files:
      Tag: R3_2_maintenance
	MANIFEST.MF 
Log Message:
update version

Index: MANIFEST.MF
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/META-INF/MANIFEST.MF,v
retrieving revision 1.29.2.9
retrieving revision 1.29.2.10
diff -C2 -d -r1.29.2.9 -r1.29.2.10
*** MANIFEST.MF	5 Oct 2012 11:52:07 -0000	1.29.2.9
--- MANIFEST.MF	16 Oct 2012 21:32:10 -0000	1.29.2.10
***************
*** 3,7 ****
  Bundle-Name: %pluginName
  Bundle-SymbolicName: org.eclipse.rse.services.dstore
! Bundle-Version: 3.1.110.qualifier
  Bundle-Activator: org.eclipse.rse.internal.services.dstore.Activator
  Bundle-Localization: plugin
--- 3,7 ----
  Bundle-Name: %pluginName
  Bundle-SymbolicName: org.eclipse.rse.services.dstore
! Bundle-Version: 3.1.111.qualifier
  Bundle-Activator: org.eclipse.rse.internal.services.dstore.Activator
  Bundle-Localization: plugin


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 21:32:13 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01779.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server	ServerLogger.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01778.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server In directory dev1:/tmp/cvs-serv31413/src/org/eclipse/dstore/core/server Modified Files: ServerLogger.java Log Message: [391774] [dstore] NPE if u...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server
In directory dev1:/tmp/cvs-serv31413/src/org/eclipse/dstore/core/server

Modified Files:
	ServerLogger.java 
Log Message:
[391774] [dstore] NPE if user-log directory cannot be created


Index: ServerLogger.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** ServerLogger.java	13 Dec 2011 13:54:41 -0000	1.20
--- ServerLogger.java	16 Oct 2012 20:14:25 -0000	1.21
***************
*** 1,4 ****
  /********************************************************************************
!  * Copyright (c) 2002, 2011 IBM Corporation. All rights reserved.
   * This program and the accompanying materials are made available under the terms
   * of the Eclipse Public License v1.0 which accompanies this distribution, and is
--- 1,4 ----
  /********************************************************************************
!  * Copyright (c) 2002, 2012 IBM Corporation. All rights reserved.
   * This program and the accompanying materials are made available under the terms
   * of the Eclipse Public License v1.0 which accompanies this distribution, and is
***************
*** 26,29 ****
--- 26,30 ----
   * David McKnight  (IBM)  - [351993] [dstore] not able to connect to server if .eclipse folder not available
   * David McKnight  (IBM)  - [366220] Log_To_File no longer default value for log_location in rsecomm.properties
+  * David McKnight  (IBM)  - [391774] [dstore] NPE if user-log directory cannot be created
   ********************************************************************************/
  
***************
*** 103,119 ****
  			if (logToFile) {
  				try {
! 			  		File _logFile = getLogFile(&quot;rsecomm&quot;); //$NON-NLS-1$			  		
! 			  		if (!_logFile.exists()){
! 			  			_logFile.createNewFile();
! 			  		}
! 			  		if (_logFile != null &amp;&amp; _logFile.canWrite()){
! 			  			_logFileStream = new PrintWriter(new FileOutputStream(_logFile));
! 			  		}
! 			  		else {
! 			  			log_level = 0;
! 						logToFile = false;
! 						_logFileStream = new PrintWriter(System.out);
  			  		}
! 
  				} catch (IOException e) {
  					System.out.println(&quot;Error opening log file &quot; + logPathName + &quot;rsecomm.log&quot;);		 //$NON-NLS-1$ //$NON-NLS-2$
--- 104,127 ----
  			if (logToFile) {
  				try {
! 			  		File _logFile = getLogFile(&quot;rsecomm&quot;); //$NON-NLS-1$
! 			  		if (_logFile != null){
! 				  		if (!_logFile.exists()){
! 				  			_logFile.createNewFile();
! 				  		}
! 				  		if (_logFile != null &amp;&amp; _logFile.canWrite()){
! 				  			_logFileStream = new PrintWriter(new FileOutputStream(_logFile));
! 				  		}
! 				  		else {
! 				  			log_level = 0;
! 							logToFile = false;
! 							_logFileStream = new PrintWriter(System.out);
! 				  		}
  			  		}
! 			  		else { // no log file, default to stdout
! 			  			System.out.println(&quot;No log file access &quot; + logPathName + &quot;rsecomm.log&quot;);		 //$NON-NLS-1$ //$NON-NLS-2$
! 				 		log_level = 0;
! 				 		logToFile = false;
! 				 		_logFileStream = new PrintWriter(System.out);	
! 			  		}	
  				} catch (IOException e) {
  					System.out.println(&quot;Error opening log file &quot; + logPathName + &quot;rsecomm.log&quot;);		 //$NON-NLS-1$ //$NON-NLS-2$


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:14:27 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01778.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server	ServerLogger.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01777.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server In directory dev2:/tmp/cvs-serv12474/src/org/eclipse/dstore/core/server Modified Files: Tag: R3_2_maintenance ServerLogger.java Log Message: [391...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server
In directory dev2:/tmp/cvs-serv12474/src/org/eclipse/dstore/core/server

Modified Files:
      Tag: R3_2_maintenance
	ServerLogger.java 
Log Message:
[391774] [dstore] NPE if user-log directory cannot be created


Index: ServerLogger.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java,v
retrieving revision 1.16.2.3
retrieving revision 1.16.2.4
diff -C2 -d -r1.16.2.3 -r1.16.2.4
*** ServerLogger.java	13 Dec 2011 13:28:40 -0000	1.16.2.3
--- ServerLogger.java	16 Oct 2012 20:14:03 -0000	1.16.2.4
***************
*** 1,4 ****
  /********************************************************************************
!  * Copyright (c) 2002, 2011 IBM Corporation. All rights reserved.
   * This program and the accompanying materials are made available under the terms
   * of the Eclipse Public License v1.0 which accompanies this distribution, and is
--- 1,4 ----
  /********************************************************************************
!  * Copyright (c) 2002, 2012 IBM Corporation. All rights reserved.
   * This program and the accompanying materials are made available under the terms
   * of the Eclipse Public License v1.0 which accompanies this distribution, and is
***************
*** 25,28 ****
--- 25,29 ----
   * David McKnight   (IBM) - [351993] [dstore] not able to connect to server if .eclipse folder not available
   * David McKnight  (IBM)  - [366220] Log_To_File no longer default value for log_location in rsecomm.properties
+  * David McKnight  (IBM)  - [391774] [dstore] NPE if user-log directory cannot be created
   ********************************************************************************/
  
***************
*** 101,121 ****
  				try {
  			  		File _logFile = getLogFile(&quot;rsecomm&quot;); //$NON-NLS-1$
! 			  		if (!_logFile.exists()){
! 			  			_logFile.createNewFile();
! 			  		}
! 			  		if (_logFile != null &amp;&amp; _logFile.canWrite()){
! 			  			_logFileStream = new PrintWriter(new FileOutputStream(_logFile));
! 			  		}
! 			  		else {
! 			  			log_level = 0;
! 						logToFile = false;
! 						_logFileStream = new PrintWriter(System.out);
  			  		}
! 
! 				} catch (IOException e) {
! 					System.out.println(&quot;Error opening log file &quot; + logPathName + &quot;rsecomm.log&quot;);		 //$NON-NLS-1$ //$NON-NLS-2$
! 					log_level = 0;
! 					logToFile = false;
! 					_logFileStream = new PrintWriter(System.out);
  				}
  			}
--- 102,129 ----
  				try {
  			  		File _logFile = getLogFile(&quot;rsecomm&quot;); //$NON-NLS-1$
! 			  		if (_logFile != null){
! 			  			if (!_logFile.exists()){
! 			  				_logFile.createNewFile();
! 			  			}
! 			  			if (_logFile != null &amp;&amp; _logFile.canWrite()){
! 			  				_logFileStream = new PrintWriter(new FileOutputStream(_logFile));
! 			  			}
! 			  			else {
! 			  				log_level = 0;
! 			  				logToFile = false;
! 			  				_logFileStream = new PrintWriter(System.out);
! 			  			}
  			  		}
! 			  		else { // no log file, default to stdout
! 			  			System.out.println(&quot;No log file access &quot; + logPathName + &quot;rsecomm.log&quot;);		 //$NON-NLS-1$ //$NON-NLS-2$
! 				 		log_level = 0;
! 				 		logToFile = false;
! 				 		_logFileStream = new PrintWriter(System.out);	
! 			  		}	
! 			  	} catch (IOException e) {
! 			  		System.out.println(&quot;Error opening log file &quot; + logPathName + &quot;rsecomm.log&quot;);		 //$NON-NLS-1$ //$NON-NLS-2$
! 			 		log_level = 0;
! 			 		logToFile = false;
! 			 		_logFileStream = new PrintWriter(System.out);			  			  		
  				}
  			}


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:14:05 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01777.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files	DStoreFileService.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01776.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files In directory dev2:/tmp/cvs-serv11543/src/org/eclipse/rse/internal/services/dstore/files Modified Files: Tag: R3_2_mainten...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files
In directory dev2:/tmp/cvs-serv11543/src/org/eclipse/rse/internal/services/dstore/files

Modified Files:
      Tag: R3_2_maintenance
	DStoreFileService.java 
Log Message:
[392012] [dstore] make server safer for delete operations


Index: DStoreFileService.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java,v
retrieving revision 1.91.2.4
retrieving revision 1.91.2.5
diff -C2 -d -r1.91.2.4 -r1.91.2.5
*** DStoreFileService.java	5 Oct 2012 19:45:05 -0000	1.91.2.4
--- DStoreFileService.java	16 Oct 2012 20:12:53 -0000	1.91.2.5
***************
*** 67,70 ****
--- 67,71 ----
   * David McKnight   (IBM)        - [390037] [dstore] Duplicated items in the System view
   * David McKnight   (IBM)        - [391164] [dstore] don't clear cached elements when they're not spirited or deleted
+  * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
   *******************************************************************************/
  
***************
*** 1524,1528 ****
  	{
  		String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
! 		DataElement de = getElementFor(remotePath);
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
--- 1525,1534 ----
  	{
  		String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
! 		
! 		// always get a fresh element for deletions (spiriting could cause issues on server-side)
! 		DataElement universaltemp = getMinerElement();
! 		String normalizedPath = PathUtility.normalizeUnknown(remotePath);
! 		DataElement de = universaltemp.getDataStore().createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, &quot;&quot;, false); //$NON-NLS-1$
! 
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
***************
*** 1569,1577 ****
  		}
  
  		ArrayList dataElements = new ArrayList(remoteParents.length);
  		for (int i = 0; i &lt; remoteParents.length; i++)
  		{
  			String remotePath = remoteParents[i] + getSeparator(remoteParents[i]) + fileNames[i];
! 			DataElement de = getElementFor(remotePath);
  			// if we don't have a proper element, we won't have a command descriptor
  			if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
--- 1575,1588 ----
  		}
  
+ 		DataElement universaltemp = getMinerElement();
  		ArrayList dataElements = new ArrayList(remoteParents.length);
  		for (int i = 0; i &lt; remoteParents.length; i++)
  		{
  			String remotePath = remoteParents[i] + getSeparator(remoteParents[i]) + fileNames[i];
! 			
! 			// always get a fresh element for deletions (spiriting could cause issues on server-side)
! 			String normalizedPath = PathUtility.normalizeUnknown(remotePath);
! 			DataElement de = universaltemp.getDataStore().createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, &quot;&quot;, false); //$NON-NLS-1$
! 			
  			// if we don't have a proper element, we won't have a command descriptor
  			if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
***************
*** 1633,1637 ****
   		}
  
!  		DataElement de = getElementFor(oldPath);
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
--- 1644,1653 ----
   		}
  
!  		// always get a fresh element for renames (spiriting could cause issues on server-side)
! 		DataElement universaltemp = getMinerElement();
! 		String normalizedPath = PathUtility.normalizeUnknown(oldPath);
! 		DataElement de = universaltemp.getDataStore().createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, &quot;&quot;, false); //$NON-NLS-1$
! 
!  		
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:12:56 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01776.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem	DeleteThread.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01775.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem In directory dev2:/tmp/cvs-serv11543/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem M...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem
In directory dev2:/tmp/cvs-serv11543/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem

Modified Files:
      Tag: R3_2_maintenance
	DeleteThread.java 
Log Message:
[392012] [dstore] make server safer for delete operations


Index: DeleteThread.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C2 -d -r1.10.2.1 -r1.10.2.2
*** DeleteThread.java	3 May 2011 13:56:53 -0000	1.10.2.1
--- DeleteThread.java	16 Oct 2012 20:12:53 -0000	1.10.2.2
***************
*** 1,4 ****
  /*******************************************************************************
!  * Copyright (c) 2007, 2011 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
--- 1,4 ----
  /*******************************************************************************
!  * Copyright (c) 2007, 2012 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
***************
*** 17,20 ****
--- 17,21 ----
   * David McKnight   (IBM)        - [321026][dstore] Broken symbolic link can't be removed
   * David McKnight   (IBM)        - [342450][dstore] Real files should not be deleted when deleting a symbolic link
+  * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
   *******************************************************************************/
  package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
***************
*** 126,213 ****
  			return handleDeleteFromArchive(subject, thisStatus);
  		}
! 
! 		File deleteObj = new File(subject.getAttribute(DE.A_VALUE)
! 				+ File.separatorChar + subject.getName());
! 		DataElement deObj = null;
! 
! 		String attributes = subject.getSource();
! 		String classification = &quot;file&quot;; //$NON-NLS-1$
! 		String[] str = attributes.split(&quot;\\&quot;+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
! 		if (str.length &gt; 11){ // 11 is classification index
! 			classification = str[11];
! 		}
! 		boolean exists = deleteObj.exists();
! 		if (!exists){
! 			// special case for broken symbolic link
! 			if (classification.startsWith(&quot;broken symbolic link&quot;)){ //$NON-NLS-1$
! 				exists = true;
  			}
! 		}
! 		
! 		if (!exists) {
! 			thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 			UniversalServerUtilities.logError(CLASSNAME,
! 					&quot;The object to delete does not exist&quot;, null, _dataStore); //$NON-NLS-1$
! 		} else {
! 			try {
! 				if (classification != null &amp;&amp; classification.startsWith(&quot;symbolic link&quot;)){ //$NON-NLS-1$
! 					// only delete the link - no the actual file or folder contents
! 					deleteObj.delete();
  				}
! 				else if (deleteObj.isFile()) {
! 					if (deleteObj.delete() == false) {
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 					} else {
! 						// delete was successful and delete the object from the
! 						// datastore
! 						deObj = _dataStore.find(subject, DE.A_NAME, subject
! 								.getName(), 1);
! 						_dataStore.deleteObject(subject, deObj);
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 					}
! 					_dataStore.refresh(subject);
! 				} else if (deleteObj.isDirectory()) { // it is directory and
! 													  // need to delete the
! 													  // entire directory +
! 					// children
! 					deleteDir(deleteObj, thisStatus);
! 					if (deleteObj.delete() == false) {
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						UniversalServerUtilities.logError(CLASSNAME,
! 								&quot;Deletion of dir fialed&quot;, null, _dataStore); //$NON-NLS-1$
! 					} else {
! 						_dataStore.deleteObjects(subject);
! 						DataElement parent = subject.getParent();
! 						_dataStore.deleteObject(parent, subject);
! 						_dataStore.refresh(parent);
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
  					}
! 				} else {
! 					// try to treat this as a file
! 					if (deleteObj.delete() == false) {
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$												
! 						UniversalServerUtilities
! 								.logError(
! 										CLASSNAME,
! 										&quot;The object to delete is neither a File or Folder! in handleDelete&quot;, //$NON-NLS-1$
! 										null, _dataStore);
  					} else {
! 						// delete was successful and delete the object from the
! 						// datastore
! 						deObj = _dataStore.find(subject, DE.A_NAME, subject
! 								.getName(), 1);
! 						_dataStore.deleteObject(subject, deObj);
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
  					}
! 					_dataStore.refresh(subject);
! 
  				}
- 			} catch (Exception e) {
- 				thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXCEPTION + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- 				thisStatus.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
- 				UniversalServerUtilities.logError(CLASSNAME,
- 						&quot;Delete of the object failed&quot;, e, _dataStore); //$NON-NLS-1$
  			}
  		}
  		_dataStore.refresh(subject);
  		return _miner.statusDone(_status);
--- 127,225 ----
  			return handleDeleteFromArchive(subject, thisStatus);
  		}
! 		else if (IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR.equals(type) ||
! 				IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR.equals(type) ||
! 				IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR.equals(type) ||
! 				IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR.equals(type)){			
! 			
! 			String path = subject.getAttribute(DE.A_VALUE)+ File.separatorChar + subject.getName();			
! 			if (path.equals(&quot;&quot;+File.separatorChar)){ // no path provided //$NON-NLS-1$
! 				return _miner.statusCancelled(_status);
  			}
! 			File deleteObj = new File(path);
! 			DataElement deObj = null;
! 	
! 			String attributes = subject.getSource();
! 			String classification = &quot;file&quot;; //$NON-NLS-1$
! 			String[] str = attributes.split(&quot;\\&quot;+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
! 			if (str.length &gt; 11){ // 11 is classification index
! 				classification = str[11];
! 			}
! 			boolean exists = deleteObj.exists();
! 			if (!exists){
! 				// special case for broken symbolic link
! 				if (classification.startsWith(&quot;broken symbolic link&quot;)){ //$NON-NLS-1$
! 					exists = true;
  				}
! 			}
! 			
! 			if (!exists) {
! 				thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 				UniversalServerUtilities.logError(CLASSNAME,
! 						&quot;The object to delete does not exist&quot;, null, _dataStore); //$NON-NLS-1$
! 			} else {
! 				try {
! 					if (classification != null &amp;&amp; classification.startsWith(&quot;symbolic link&quot;)){ //$NON-NLS-1$
! 						// only delete the link - no the actual file or folder contents
! 						deleteObj.delete();
  					}
! 					else if (deleteObj.isFile()) {
! 						if (deleteObj.delete() == false) {
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						} else {
! 							// delete was successful and delete the object from the
! 							// datastore
! 							deObj = _dataStore.find(subject, DE.A_NAME, subject
! 									.getName(), 1);
! 							_dataStore.deleteObject(subject, deObj);
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						}
! 						_dataStore.refresh(subject);
! 					} else if (deleteObj.isDirectory()) { // it is directory and
! 														  // need to delete the
! 														  // entire directory +
! 						// children
! 						deleteDir(deleteObj, thisStatus);
! 						if (deleteObj.delete() == false) {
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 							UniversalServerUtilities.logError(CLASSNAME,
! 									&quot;Deletion of dir fialed&quot;, null, _dataStore); //$NON-NLS-1$
! 						} else {
! 							_dataStore.deleteObjects(subject);
! 							DataElement parent = subject.getParent();
! 							_dataStore.deleteObject(parent, subject);
! 							_dataStore.refresh(parent);
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						}
  					} else {
! 						// try to treat this as a file
! 						if (deleteObj.delete() == false) {
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$												
! 							UniversalServerUtilities
! 									.logError(
! 											CLASSNAME,
! 											&quot;The object to delete is neither a File or Folder! in handleDelete&quot;, //$NON-NLS-1$
! 											null, _dataStore);
! 						} else {
! 							// delete was successful and delete the object from the
! 							// datastore
! 							deObj = _dataStore.find(subject, DE.A_NAME, subject
! 									.getName(), 1);
! 							_dataStore.deleteObject(subject, deObj);
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						}
! 						_dataStore.refresh(subject);
! 	
  					}
! 				} catch (Exception e) {
! 					thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXCEPTION + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 					thisStatus.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
! 					UniversalServerUtilities.logError(CLASSNAME,
! 							&quot;Delete of the object failed&quot;, e, _dataStore); //$NON-NLS-1$
  				}
  			}
  		}
+ 		else {
+ 			_dataStore.trace(&quot;attempt to delete &quot;+subject + &quot; prevented&quot;);  //$NON-NLS-1$//$NON-NLS-2$
+ 		}
  		_dataStore.refresh(subject);
  		return _miner.statusDone(_status);
***************
*** 255,259 ****
  		try {
  			File list[] = fileObj.listFiles();
! 			for (int i = 0; i &lt; list.length; ++i) {
  				if (list[i].isFile()) {
  					if (!(list[i].delete())) {
--- 267,271 ----
  		try {
  			File list[] = fileObj.listFiles();
! 			for (int i = 0; i &lt; list.length &amp;&amp; !_isCancelled; ++i) {
  				if (list[i].isFile()) {
  					if (!(list[i].delete())) {


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:12:55 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01775.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners	UniversalFileSystemMiner.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01774.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners In directory dev2:/tmp/cvs-serv11543/miners/org/eclipse/rse/dstore/universal/miners Modified Files: Tag: R3_2_maintenance Uni...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners
In directory dev2:/tmp/cvs-serv11543/miners/org/eclipse/rse/dstore/universal/miners

Modified Files:
      Tag: R3_2_maintenance
	UniversalFileSystemMiner.java 
Log Message:
[392012] [dstore] make server safer for delete operations


Index: UniversalFileSystemMiner.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java,v
retrieving revision 1.51.2.5
retrieving revision 1.51.2.6
diff -C2 -d -r1.51.2.5 -r1.51.2.6
*** UniversalFileSystemMiner.java	21 Sep 2012 18:54:39 -0000	1.51.2.5
--- UniversalFileSystemMiner.java	16 Oct 2012 20:12:53 -0000	1.51.2.6
***************
*** 46,49 ****
--- 46,50 ----
   * Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect
   * David McKnight   (IBM)        - [390037] [dstore] Duplicated items in the System view
+  * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
   *******************************************************************************/
  
***************
*** 54,57 ****
--- 55,59 ----
  import java.io.InputStreamReader;
  import java.net.ServerSocket;
+ import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.Iterator;
***************
*** 461,464 ****
--- 463,467 ----
  	{
  		//First Check to make sure that there are no &quot;zombie&quot; threads
+ 		List threadsToRemove = new ArrayList();
  		Iterator iter = _cancellableThreads.keySet().iterator();
  		try
***************
*** 471,475 ****
  						theThread.isDone() || theThread.isCancelled())
  				{
! 					_cancellableThreads.remove(threadElement);
  				}
  			}
--- 474,483 ----
  						theThread.isDone() || theThread.isCancelled())
  				{
! 					threadsToRemove.add(threadElement);
! 				}
! 			}
! 			if (!threadsToRemove.isEmpty()){
! 				for (int i = 0; i &lt; threadsToRemove.size(); i++){
! 					_cancellableThreads.remove(threadsToRemove.get(i));
  				}
  			}
***************
*** 484,488 ****
  		}
  	}
! 
  
  	  /**
--- 492,496 ----
  		}
  	}
! 	
  
  	  /**
***************
*** 644,651 ****
  	 */
  	public DataElement handleDelete(DataElement subject, DataElement status, boolean refreshDataStore) {
! 		DeleteThread deleteThread = new DeleteThread(subject,  this, _dataStore, false, status);
! 		deleteThread.start();
  
! 		updateCancellableThreads(status.getParent(), deleteThread);
  
  		return status;
--- 652,673 ----
  	 */
  	public DataElement handleDelete(DataElement subject, DataElement status, boolean refreshDataStore) {
! 		// first make sure this is a valid object to delete
! 		String type = subject.getType();	
! 		if (IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR.equals(type)){
! 			
! 			DeleteThread deleteThread = new DeleteThread(subject,  this, _dataStore, false, status);
! 			deleteThread.start();
  
! 			updateCancellableThreads(status.getParent(), deleteThread);
! 		}
! 		else {
! 			UniversalServerUtilities.logWarning(getName(), &quot;illegal deletion type: &quot; + type, _dataStore); //$NON-NLS-1$
! 			statusCancelled(status);
! 		}
  
  		return status;
***************
*** 654,662 ****
  	private DataElement handleDeleteBatch(DataElement theElement, DataElement status)
  	{
  		DeleteThread deleteThread = new DeleteThread(theElement,  this, _dataStore, true, status);
  		deleteThread.start();
  
  		updateCancellableThreads(status.getParent(), deleteThread);
- 
  		return status;
  	}
--- 676,684 ----
  	private DataElement handleDeleteBatch(DataElement theElement, DataElement status)
  	{
+ 		// theElement (for delete batch) is the full command
  		DeleteThread deleteThread = new DeleteThread(theElement,  this, _dataStore, true, status);
  		deleteThread.start();
  
  		updateCancellableThreads(status.getParent(), deleteThread);
  		return status;
  	}


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:12:55 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01774.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem	DeleteThread.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01773.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem In directory dev1:/tmp/cvs-serv29512/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem M...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem
In directory dev1:/tmp/cvs-serv29512/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem

Modified Files:
	DeleteThread.java 
Log Message:
[392012] [dstore] make server safer for delete operations


Index: DeleteThread.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DeleteThread.java	3 May 2011 13:11:43 -0000	1.11
--- DeleteThread.java	16 Oct 2012 20:11:56 -0000	1.12
***************
*** 1,4 ****
  /*******************************************************************************
!  * Copyright (c) 2007, 2011 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
--- 1,4 ----
  /*******************************************************************************
!  * Copyright (c) 2007, 2012 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
***************
*** 17,20 ****
--- 17,21 ----
   * David McKnight   (IBM)        - [321026][dstore] Broken symbolic link can't be removed
   * David McKnight   (IBM)        - [342450][dstore] Real files should not be deleted when deleting a symbolic link
+  * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
   *******************************************************************************/
  package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
***************
*** 120,124 ****
  	private DataElement handleDelete(DataElement subject, DataElement thisStatus) throws SystemMessageException
  	{
- 
  		String type = subject.getType();
  		if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
--- 121,124 ----
***************
*** 126,214 ****
  			return handleDeleteFromArchive(subject, thisStatus);
  		}
! 
! 		File deleteObj = new File(subject.getAttribute(DE.A_VALUE)
! 				+ File.separatorChar + subject.getName());
! 		DataElement deObj = null;
! 
! 		String attributes = subject.getSource();
! 		String classification = &quot;file&quot;; //$NON-NLS-1$
! 		String[] str = attributes.split(&quot;\\&quot;+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
! 		if (str.length &gt; 11){ // 11 is classification index
! 			classification = str[11];
! 		}
! 		boolean exists = deleteObj.exists();
! 		if (!exists){
! 			// special case for broken symbolic link
! 			if (classification.startsWith(&quot;broken symbolic link&quot;)){ //$NON-NLS-1$
! 				exists = true;
  			}
! 		}
! 		
! 		if (!exists) {
! 			thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 			UniversalServerUtilities.logError(CLASSNAME,
! 					&quot;The object to delete does not exist&quot;, null, _dataStore); //$NON-NLS-1$
! 		} else {
! 			try {
! 				if (classification != null &amp;&amp; classification.startsWith(&quot;symbolic link&quot;)){ //$NON-NLS-1$
! 					// only delete the link - no the actual file or folder contents
! 					deleteObj.delete();
  				}
! 				else if (deleteObj.isFile()) {
! 					if (deleteObj.delete() == false) {
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 					} else {
! 						// delete was successful and delete the object from the
! 						// datastore
! 						deObj = _dataStore.find(subject, DE.A_NAME, subject
! 								.getName(), 1);
! 						_dataStore.deleteObject(subject, deObj);
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 					}
! 					_dataStore.refresh(subject);
! 				} else if (deleteObj.isDirectory()) { // it is directory and
! 													  // need to delete the
! 													  // entire directory +
! 					// children
! 					deleteDir(deleteObj, thisStatus);
! 					if (deleteObj.delete() == false) {
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						UniversalServerUtilities.logError(CLASSNAME,
! 								&quot;Deletion of dir fialed&quot;, null, _dataStore); //$NON-NLS-1$
! 					} else {
! 						_dataStore.deleteObjects(subject);
! 						DataElement parent = subject.getParent();
! 						_dataStore.deleteObject(parent, subject);
! 						_dataStore.refresh(parent);
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
  					}
! 				} else {
! 					// try to treat this as a file
! 					if (deleteObj.delete() == false) {
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$												
! 						UniversalServerUtilities
! 								.logError(
! 										CLASSNAME,
! 										&quot;The object to delete is neither a File or Folder! in handleDelete&quot;, //$NON-NLS-1$
! 										null, _dataStore);
  					} else {
! 						// delete was successful and delete the object from the
! 						// datastore
! 						deObj = _dataStore.find(subject, DE.A_NAME, subject
! 								.getName(), 1);
! 						_dataStore.deleteObject(subject, deObj);
! 						thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
  					}
! 					_dataStore.refresh(subject);
! 
  				}
- 			} catch (Exception e) {
- 				thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXCEPTION + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- 				thisStatus.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
- 				UniversalServerUtilities.logError(CLASSNAME,
- 						&quot;Delete of the object failed&quot;, e, _dataStore); //$NON-NLS-1$
  			}
  		}
- 		_dataStore.refresh(subject);
  		return _miner.statusDone(_status);
  
--- 126,225 ----
  			return handleDeleteFromArchive(subject, thisStatus);
  		}
! 		else if (IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR.equals(type) ||
! 				IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR.equals(type) ||
! 				IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR.equals(type) ||
! 				IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR.equals(type)){			
! 			
! 			String path = subject.getAttribute(DE.A_VALUE)+ File.separatorChar + subject.getName();			
! 			if (path.equals(&quot;&quot;+File.separatorChar)){ // no path provided //$NON-NLS-1$
! 				return _miner.statusCancelled(_status);
  			}
! 			File deleteObj = new File(path);
! 			DataElement deObj = null;
! 	
! 			String attributes = subject.getSource();
! 			String classification = &quot;file&quot;; //$NON-NLS-1$
! 			String[] str = attributes.split(&quot;\\&quot;+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
! 			if (str.length &gt; 11){ // 11 is classification index
! 				classification = str[11];
! 			}
! 			boolean exists = deleteObj.exists();
! 			if (!exists){
! 				// special case for broken symbolic link
! 				if (classification.startsWith(&quot;broken symbolic link&quot;)){ //$NON-NLS-1$
! 					exists = true;
  				}
! 			}
! 			
! 			if (!exists) {
! 				thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 				UniversalServerUtilities.logError(CLASSNAME,
! 						&quot;The object to delete does not exist&quot;, null, _dataStore); //$NON-NLS-1$
! 			} else {
! 				try {
! 					if (classification != null &amp;&amp; classification.startsWith(&quot;symbolic link&quot;)){ //$NON-NLS-1$
! 						// only delete the link - no the actual file or folder contents
! 						deleteObj.delete();
  					}
! 					else if (deleteObj.isFile()) {
! 						if (deleteObj.delete() == false) {
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						} else {
! 							// delete was successful and delete the object from the
! 							// datastore
! 							deObj = _dataStore.find(subject, DE.A_NAME, subject
! 									.getName(), 1);
! 							_dataStore.deleteObject(subject, deObj);
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						}
! 						_dataStore.refresh(subject);
! 					} else if (deleteObj.isDirectory()) { // it is directory and
! 														  // need to delete the
! 														  // entire directory +
! 						// children
! 						deleteDir(deleteObj, thisStatus);
! 						if (deleteObj.delete() == false) {
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 							UniversalServerUtilities.logError(CLASSNAME,
! 									&quot;Deletion of dir fialed&quot;, null, _dataStore); //$NON-NLS-1$
! 						} else {
! 							_dataStore.deleteObjects(subject);
! 							DataElement parent = subject.getParent();
! 							_dataStore.deleteObject(parent, subject);
! 							_dataStore.refresh(parent);
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						}
  					} else {
! 						// try to treat this as a file
! 						if (deleteObj.delete() == false) {
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$												
! 							UniversalServerUtilities
! 									.logError(
! 											CLASSNAME,
! 											&quot;The object to delete is neither a File or Folder! in handleDelete&quot;, //$NON-NLS-1$
! 											null, _dataStore);
! 						} else {
! 							// delete was successful and delete the object from the
! 							// datastore
! 							deObj = _dataStore.find(subject, DE.A_NAME, subject
! 									.getName(), 1);
! 							_dataStore.deleteObject(subject, deObj);
! 							thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 						}
! 						_dataStore.refresh(subject);
! 	
  					}
! 				} catch (Exception e) {
! 					thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXCEPTION + &quot;|&quot; + deleteObj.getAbsolutePath()); //$NON-NLS-1$
! 					thisStatus.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
! 					UniversalServerUtilities.logError(CLASSNAME,
! 							&quot;Delete of the object failed&quot;, e, _dataStore); //$NON-NLS-1$
  				}
  			}
+ 			_dataStore.refresh(subject);
+ 		}
+ 		else {
+ 			_dataStore.trace(&quot;attempt to delete &quot;+subject + &quot; prevented&quot;);  //$NON-NLS-1$//$NON-NLS-2$
  		}
  		return _miner.statusDone(_status);
  
***************
*** 255,259 ****
  		try {
  			File list[] = fileObj.listFiles();
! 			for (int i = 0; i &lt; list.length; ++i) {
  				if (list[i].isFile()) {
  					if (!(list[i].delete())) {
--- 266,270 ----
  		try {
  			File list[] = fileObj.listFiles();
! 			for (int i = 0; i &lt; list.length &amp;&amp; !_isCancelled; ++i) {
  				if (list[i].isFile()) {
  					if (!(list[i].delete())) {


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:11:58 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01773.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files	DStoreFileService.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01772.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files In directory dev1:/tmp/cvs-serv29512/src/org/eclipse/rse/internal/services/dstore/files Modified Files: DStoreFileService...</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files
In directory dev1:/tmp/cvs-serv29512/src/org/eclipse/rse/internal/services/dstore/files

Modified Files:
	DStoreFileService.java 
Log Message:
[392012] [dstore] make server safer for delete operations


Index: DStoreFileService.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** DStoreFileService.java	5 Oct 2012 19:47:43 -0000	1.96
--- DStoreFileService.java	16 Oct 2012 20:11:56 -0000	1.97
***************
*** 1525,1529 ****
  	{
  		String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
! 		DataElement de = getElementFor(remotePath);
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
--- 1525,1534 ----
  	{
  		String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
! 
! 		// always get a fresh element for deletions (spiriting could cause issues on server-side)
! 		DataElement universaltemp = getMinerElement();
! 		String normalizedPath = PathUtility.normalizeUnknown(remotePath);
! 		DataElement de = universaltemp.getDataStore().createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, &quot;&quot;, false); //$NON-NLS-1$
! 
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
***************
*** 1569,1578 ****
  			return;
  		}
! 
  		ArrayList dataElements = new ArrayList(remoteParents.length);
  		for (int i = 0; i &lt; remoteParents.length; i++)
  		{
  			String remotePath = remoteParents[i] + getSeparator(remoteParents[i]) + fileNames[i];
! 			DataElement de = getElementFor(remotePath);
  			// if we don't have a proper element, we won't have a command descriptor
  			if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
--- 1574,1587 ----
  			return;
  		}
! 		DataElement universaltemp = getMinerElement();
  		ArrayList dataElements = new ArrayList(remoteParents.length);
  		for (int i = 0; i &lt; remoteParents.length; i++)
  		{
  			String remotePath = remoteParents[i] + getSeparator(remoteParents[i]) + fileNames[i];
! 			
! 			// always get a fresh element for deletions (spiriting could cause issues on server-side)
! 			String normalizedPath = PathUtility.normalizeUnknown(remotePath);
! 			DataElement de = universaltemp.getDataStore().createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, &quot;&quot;, false); //$NON-NLS-1$
! 
  			// if we don't have a proper element, we won't have a command descriptor
  			if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
***************
*** 1634,1638 ****
   		}
  
!  		DataElement de = getElementFor(oldPath);
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
--- 1643,1651 ----
   		}
  
!  		// always get a fresh element for renames (spiriting could cause issues on server-side)
! 		DataElement universaltemp = getMinerElement();
! 		String normalizedPath = PathUtility.normalizeUnknown(oldPath);
! 		DataElement de = universaltemp.getDataStore().createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, &quot;&quot;, false); //$NON-NLS-1$
!  		
  		// if we don't have a proper element, we won't have a command descriptor
  		if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:11:58 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01772.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>
	<item>
		<title>[tm-cvs-commit] dmcknight	org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners	UniversalFileSystemMiner.java</title>
		<link>http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01771.html</link>
		<description>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners In directory dev1:/tmp/cvs-serv29512/miners/org/eclipse/rse/dstore/universal/miners Modified Files: UniversalFileSystemMiner....</description>
		<content:encoded><![CDATA[<pre>Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners
In directory dev1:/tmp/cvs-serv29512/miners/org/eclipse/rse/dstore/universal/miners

Modified Files:
	UniversalFileSystemMiner.java 
Log Message:
[392012] [dstore] make server safer for delete operations


Index: UniversalFileSystemMiner.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** UniversalFileSystemMiner.java	21 Sep 2012 18:53:21 -0000	1.56
--- UniversalFileSystemMiner.java	16 Oct 2012 20:11:56 -0000	1.57
***************
*** 46,49 ****
--- 46,50 ----
   * Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect
   * David McKnight   (IBM)        - [390037] [dstore] Duplicated items in the System view
+  * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
   *******************************************************************************/
  
***************
*** 54,57 ****
--- 55,59 ----
  import java.io.InputStreamReader;
  import java.net.ServerSocket;
+ import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.Iterator;
***************
*** 463,466 ****
--- 465,469 ----
  	{
  		//First Check to make sure that there are no &quot;zombie&quot; threads
+ 		List threadsToRemove = new ArrayList();
  		Iterator iter = _cancellableThreads.keySet().iterator();
  		try
***************
*** 473,477 ****
  						theThread.isDone() || theThread.isCancelled())
  				{
! 					_cancellableThreads.remove(threadElement);
  				}
  			}
--- 476,485 ----
  						theThread.isDone() || theThread.isCancelled())
  				{
! 					threadsToRemove.add(threadElement);
! 				}
! 			}
! 			if (!threadsToRemove.isEmpty()){
! 				for (int i = 0; i &lt; threadsToRemove.size(); i++){
! 					_cancellableThreads.remove(threadsToRemove.get(i));
  				}
  			}
***************
*** 486,490 ****
  		}
  	}
! 
  
  	  /**
--- 494,498 ----
  		}
  	}
! 	
  
  	  /**
***************
*** 646,653 ****
  	 */
  	public DataElement handleDelete(DataElement subject, DataElement status, boolean refreshDataStore) {
! 		DeleteThread deleteThread = new DeleteThread(subject,  this, _dataStore, false, status);
! 		deleteThread.start();
  
! 		updateCancellableThreads(status.getParent(), deleteThread);
  
  		return status;
--- 654,675 ----
  	 */
  	public DataElement handleDelete(DataElement subject, DataElement status, boolean refreshDataStore) {
! 		// first make sure this is a valid object to delete
! 		String type = subject.getType();	
! 		if (IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR.equals(type) ||
! 			IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR.equals(type)){
! 			
! 			DeleteThread deleteThread = new DeleteThread(subject,  this, _dataStore, false, status);
! 			deleteThread.start();
  
! 			updateCancellableThreads(status.getParent(), deleteThread);
! 		}
! 		else {
! 			UniversalServerUtilities.logWarning(getName(), &quot;illegal deletion type: &quot; + type, _dataStore); //$NON-NLS-1$
! 			statusCancelled(status);
! 		}
  
  		return status;
***************
*** 660,666 ****
  
  		updateCancellableThreads(status.getParent(), deleteThread);
- 
  		return status;
  	}
  
  	/**
--- 682,688 ----
  
  		updateCancellableThreads(status.getParent(), deleteThread);
  		return status;
  	}
+ 	
  
  	/**


</pre>]]></content:encoded>
		<pubDate>Tue, 16 Oct 2012 20:11:58 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/lists/tm-cvs-commit/msg01771.html</guid>
		<author>genie@xxxxxxx (Eclipse CVS Genie)</author>
	</item>

 
	</channel>
	</rss>
<!-- MHonArc v2.6.10 -->
