1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

need to normalize path when linux client copies from windows - bug 161844

This commit is contained in:
David McKnight 2006-10-23 15:20:46 +00:00
parent a1cc2c6641
commit 3a86c51d61

View file

@ -1669,7 +1669,9 @@ public class UniversalFileTransferUtility
}
path = path.append(absolutePath);
IPath workspacePath = getLocalPathObject(path.toString());
String pathstr = normalizePath(path.toString(), srcFileOrFolder.getParentRemoteFileSubSystem().getSeparatorChar());
IPath workspacePath = getLocalPathObject(pathstr);
IResource result = null;
if (srcFileOrFolder.isDirectory())
@ -1684,6 +1686,16 @@ public class UniversalFileTransferUtility
return result;
}
protected static String normalizePath(String localpath, char rmtSeparator)
{
char localSeparator = File.separatorChar;
if (localSeparator != rmtSeparator)
{
return localpath.replace(rmtSeparator, localSeparator);
}
return localpath;
}
/**
* Returns the corresponding temp file location for a local file or folder.
* @param srcFileOrFolder the local file or folder.