Bug 429354 - Remote browsing does not properly handle directory names containing a colon
Summary: Remote browsing does not properly handle directory names containing a colon
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: remote (show other bugs)
Version: Next   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, needinfo
Depends on:
Blocks:
 
Reported: 2014-02-28 13:56 EST by John Eblen CLA
Modified: 2022-03-09 14:35 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Eblen CLA 2014-02-28 13:56:35 EST
This problem occurs when browsing remote folders in the new synchronized project's wizard. On Windows, but not on Linux, directories with a colon in the name are not handled correctly. If the colon is in the middle, the portion before the colon is removed. If the colon is at the end, an NPE occurs:

java.lang.NullPointerException
	at org.eclipse.ptp.internal.remote.ui.DeferredFileStore.fetchDeferredChildren(DeferredFileStore.java:69)
	at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

It seems that only the part after the : is taken as the directory name. If the colon is at the end, then the name is null, causing the NPE. I assume that on Windows, the parser considers the portion before the colon to be a device identifier and discards it.

It's odd that Windows parses remote system directories differently from Linux, and we usually assume remote systems to be "Linux-like" when in doubt. On the other hand, a user might want to create a "remote" connection to their local machine...
Comment 1 Greg Watson CLA 2014-05-30 10:12:41 EDT
This code has moved to org.eclipse.remote, so needs to be retested to verify the problem still occurs.
Comment 2 John Eblen CLA 2014-05-30 16:13:01 EDT
Yes, problems still occur. I tested it with a directory that contains two empty subdirectories, one with a colon in the middle and one with a colon at the end. The error is the same if the colon is in the middle. If at the end, the directory is not listed at all (no NPE). In some cases the parent directory is listed instead and can be opened recursively. (This seems to depend on which directory comes first alphabetically.)
Comment 3 Greg Watson CLA 2014-05-30 16:47:28 EDT
Please attach stack trace.
Comment 4 John Eblen CLA 2014-05-30 16:50:24 EDT
There is no stack trace. The NPE no longer occurs.
Comment 5 John Eblen CLA 2014-06-02 12:29:49 EDT
Reassigning.
Comment 6 Greg Watson CLA 2014-06-04 08:26:38 EDT
I don't have access to a windows system to debug this. Someone with access to windows will need to provide a patch.
Comment 7 Patrick Tasse CLA 2015-10-20 16:56:58 EDT
This might be fixed by the use of the POSIX path (Bug 454063)?
Comment 8 Jonah Graham CLA 2022-03-09 14:35:43 EST
The org.eclipse.remote component of the Eclipse Ecosystem has a new home. It is now part of the Eclipse CDT project[1].

This change means a new Git repo[2], P2 site[3] and Bugzilla component. The org.eclipse.remote will continue to be delivered as part of the quarterly Simultaneous Release of Eclipse as well.

If this bug is no longer relevant, please feel free to comment or close the bug. If you can confirm if this issues still occurs in the latest release please do let me know in a comment.

[1] https://wiki.eclipse.org/CDT/User/NewIn106
[2] https://git.eclipse.org/c/cdt/org.eclipse.cdt.git (in the remote
directory)
[3] first CDT release will be 10.6 - P2 site will be
https://download.eclipse.org/tools/cdt/releases/10.6/

(This comment was added to all relevant org.eclipse.remote bugs along with changing the Product/component pair to CDT/remote.)