Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: need to escape spaces when invoking nautilus #23

Closed
genodeftest opened this issue Mar 17, 2013 · 2 comments
Closed

bug: need to escape spaces when invoking nautilus #23

genodeftest opened this issue Mar 17, 2013 · 2 comments
Assignees

Comments

@genodeftest
Copy link
Contributor

Sorry, forgot to add description

If my project is located in a folder containing spaces or in a subfolder of a folder containing spaces, nautilus can not open the folder because it splits up the path.

Example:
project is located at "/home/user/A B/C D/"
as with 1.4.0 nautilus will be started with this command:

nautilus "/home/user/A B/C D/"

which is incorrect since all spaces need to be escaped to

nautilus "/home/user/A\ B/C\ D/"

instead of opening the correct path, nautilus tries to open 4 folders:
/home/user/A
/home/user/B
/home/user/C
/home/user/D
since every non-prefixed path is interpreted as path within ~ (/home/user/)

@ghost ghost assigned basti1302 Mar 21, 2013
@basti1302
Copy link
Collaborator

I've uploaded a new version, which should fix this issue. Could you please install 1.4.0 and verify the fix?

Actually, the problem could not be fixed by simply adding escape backslashes. For the record, the solution was to use

http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#exec%28java.lang.String[],%20java.lang.String[],%20java.io.File%29

instead of

http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#exec%28java.lang.String,%20java.lang.String[],%20java.io.File%29

Otherwise, Runtime.exec splits the command string at every whitespace before even handing it over to the shell - no amount of wrapping or escaping will help that.

@genodeftest
Copy link
Contributor Author

Fixed. Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants