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

Fix dirname detection on Windows systems #41

Closed
wants to merge 1 commit into from
Closed

Fix dirname detection on Windows systems #41

wants to merge 1 commit into from

Conversation

zedxxx
Copy link
Contributor

@zedxxx zedxxx commented Oct 27, 2014

On Windows systems function dirname fails and always return .
This fix replace all Windows backslashes \ to Unix forward slashes / in script path, so dirname return proper dir.

@zedxxx zedxxx mentioned this pull request Oct 28, 2014
@frej
Copy link
Owner

frej commented Nov 1, 2014

Sorry, I will not commit this. \ is a perfectly valid (if uncommon) filename component on unix. To me this is a bug in dirname, not fast-export.

@zedxxx zedxxx closed this Nov 1, 2014
@zedxxx zedxxx deleted the windows branch November 1, 2014 16:06
@zedxxx
Copy link
Contributor Author

zedxxx commented Nov 1, 2014

No bugs in dirname, because it's work only with /:

Usage: dirname NAME
  or:  dirname OPTION
Print NAME with its trailing /component removed; if NAME contains no /'s,
output '.' (meaning the current directory).

  --help      display this help and exit
  --version   output version information and exit

Report bugs to <bug-sh-utils@gnu.org>.

Is any idea about how can I fix ROOT detection in *.sh script on Windows?

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

Successfully merging this pull request may close these issues.

2 participants