Lines 15-21
Link Here
|
15 |
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API |
15 |
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API |
16 |
* Xuan Chen (IBM) - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root |
16 |
* Xuan Chen (IBM) - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root |
17 |
* Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload |
17 |
* Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload |
18 |
* David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout |
18 |
* David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout |
|
|
19 |
* Xuan Chen (IBM) - [190824] Incorrect result for DStore#getSeparator() function when parent is "/" |
19 |
********************************************************************************/ |
20 |
********************************************************************************/ |
20 |
|
21 |
|
21 |
package org.eclipse.rse.internal.services.dstore.files; |
22 |
package org.eclipse.rse.internal.services.dstore.files; |
Lines 786-792
Link Here
|
786 |
*/ |
787 |
*/ |
787 |
protected String getSeparator(String parentPath) |
788 |
protected String getSeparator(String parentPath) |
788 |
{ |
789 |
{ |
789 |
if (parentPath == null || parentPath.length() < 2) return "/"; //$NON-NLS-1$ |
790 |
if (parentPath == null || parentPath.length() < 1) return "/"; //$NON-NLS-1$ |
|
|
791 |
if (parentPath.length() == 1) |
792 |
{ |
793 |
//deal with the case where parentPath has only one character here |
794 |
//since the code below assumes parentPath has at least two characters. |
795 |
if (parentPath.charAt(0) == '/') |
796 |
{ |
797 |
return ""; //$NON-NLS-1$ |
798 |
} |
799 |
else |
800 |
{ |
801 |
//If only one character, but not '/', just return "/" as default. But this should not happen. |
802 |
return "/"; //$NON-NLS-1$ |
803 |
} |
804 |
} |
790 |
if (parentPath.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR)) |
805 |
if (parentPath.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR)) |
791 |
return ""; //$NON-NLS-1$ |
806 |
return ""; //$NON-NLS-1$ |
792 |
if (parentPath.endsWith(ArchiveHandlerManager.VIRTUAL_CANONICAL_SEPARATOR)) |
807 |
if (parentPath.endsWith(ArchiveHandlerManager.VIRTUAL_CANONICAL_SEPARATOR)) |