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

dirname returns whitespace instead of an escaped whitespace #289

Closed
mathias-goebel opened this issue Aug 6, 2014 · 4 comments
Closed

dirname returns whitespace instead of an escaped whitespace #289

mathias-goebel opened this issue Aug 6, 2014 · 4 comments
Assignees
Labels
awaiting-response requires additional information from submitter enhancement new features, suggestions, etc. investigate issues being looked at

Comments

@mathias-goebel
Copy link
Contributor

in
exist / bin / functions.d / eXist-settings.sh
you are using dirname that can't handle whitespaces very well.
see for example:

$ dirname /some_path\ with_space/somefile
/some_path with_space

in my case this causes an error when executing startup.sh, but starting with run.sh works just fine. strange.

@mathias-goebel mathias-goebel changed the title dirname returns whitespace instead of an escaped withespace dirname returns whitespace instead of an escaped whitespace Aug 6, 2014
@dizzzz
Copy link
Member

dizzzz commented Aug 6, 2014

I had similar issues in the past, but I am not sure if/how we fixed it. @ljo could you check ?

@mathias-goebel what exist version, operating system, shell etc are you using?

@mathias-goebel
Copy link
Contributor Author

I am using some Ubuntu and Debian systems pretty new stable versions.
eXist is some pre 2.2RC2 build from github within a Jetty and Java 7.
But I guess these facts are obsolete, the error occurs shortly after executing the startup.sh with an output like Error in line 14 at eXist-settings.sh. Probably run.sh uses the same function called get_exist_home(), but it goes on - that what I mean with "strange".
I think two quotation marks will solve this problem:

(cd "$(/usr/bin/dirname "$p")" ; /bin/pwd)

Quoted folder names are treated correct, even with unescaped withespaces.
But you have to be aware of the following output treatment, /bin/pwd gives you unescaped whitespaces again!

@duncdrum duncdrum added the awaiting-response requires additional information from submitter label Nov 11, 2019
@duncdrum
Copy link
Contributor

a lot has changed with scripts since exist2.2RC2. Is this still an issue, otherwise i m going to close this. Please open a new issue, if whitespaces are still misbehaving.

@mathias-goebel
Copy link
Contributor Author

i can not start eXist on linux when the path to eXist contains a whitespace. but is not related to the function mentioned above.
will continue at #3101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response requires additional information from submitter enhancement new features, suggestions, etc. investigate issues being looked at
Projects
None yet
Development

No branches or pull requests

4 participants