Bug 413957 - connector uses wrong workspace path with space
Summary: connector uses wrong workspace path with space
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P1 major (vote)
Target Milestone: 2.0.1   Edit
Assignee: Miles Parker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 413363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-29 20:05 EDT by Sam Davis CLA
Modified: 2013-08-06 03:48 EDT (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 Sam Davis CLA 2013-07-29 20:05:47 EDT
In a workspace in a directory with a space in its name where I have only ever installed version 2.0.1.I20130712-2204 of Gerrit, when I query it creates a directory with the same path but with the space replaced with a %20 containing .metadata\.mylyn\reviews_bin. E.g. if my workspace path is C:\test eclipses\workspace1 I get a C:\test%20eclipses\workspace1 directory.
Comment 1 Miles Parker CLA 2013-07-29 20:11:04 EDT
That's not good. We need to fix the Ecore URL encoding. I thought we already had a test for this, but I guess not...
Comment 2 Miles Parker CLA 2013-07-30 14:54:33 EDT
Ok, I'm able to reproduce, but only for the special case where the space is in the first level directory. If I do e.g. C:\Users\Miles Parker\blah it works as expected. That must have been the case that was already handled that I was thinking of.
Comment 3 Miles Parker CLA 2013-07-30 15:05:33 EDT
Note that this only appears to break in Windows, not Mac.
Comment 4 Miles Parker CLA 2013-07-30 15:37:35 EDT
https://git.eclipse.org/r/14990

As I step through execution, this could also explain some other anomalies, as when we get the resource the code thinks it doesn't exist and we need to keep recreating the resource over and over. (EMF does *find* the resource in the correct place, it's the connector code that's getting the path right.) Note that you shouldn't actually have anything in that directory, and you *should* have a directory C:\test eclipses\workspace1\.metadata\.mylyn\reviews_bin that contains the files, correct?

Sam, do you often actually have this case where the first segment includes spaces?
Comment 5 Miles Parker CLA 2013-07-30 15:39:08 EDT
Note that I haven't thought of a really good way to test this *specific* case, because I don't think I can use a root directory for the tests and this only appears to happen on Windows which isn't unit tested anyway.
Comment 6 Miles Parker CLA 2013-07-30 18:04:02 EDT
Ok, I've put it under testing now. On further investigation, this seems to happen regardless of where the spaces are in the path, and regardless of Operating System. I think it's also likely that this was the original cause for a number of recent bugs, including bug 413363 and bug 413362 and might explain why some issues seemed reproducible and others didn't.

Nice find, Sam. Thanks!
Comment 7 Sam Davis CLA 2013-07-30 18:40:25 EDT
(In reply to comment #4)
> Sam, do you often actually have this case where the first segment includes
> spaces?

I always have this case when testing by installing a build into eclipse. I don't have this case in my normal development and testing workspaces.
Comment 8 Miles Parker CLA 2013-07-31 15:28:35 EDT
Merged https://git.eclipse.org/r/14990.
Comment 9 Miles Parker CLA 2013-07-31 15:42:35 EDT
*** Bug 413363 has been marked as a duplicate of this bug. ***
Comment 10 Thomas Ehrnhoefer CLA 2013-08-06 03:48:52 EDT
*** Bug 413363 has been marked as a duplicate of this bug. ***