RE: Patch for Build under MSW + MSYS2
"Roland Winkler" <[email protected]>
| Newsgroups | gmane.emacs.bbdb.user |
|---|---|
| Message-ID | <[email protected]> |
On Sat Feb 3 2018 Vincent Belaïche wrote: > The patch computes the absolute path in a shell variable named > abs_target in order to use maybe the cygpath -w command and get the real > path. Automake CYGPATH_W expands to cygpath -w on MSWindows, and to echo > otherwise. What is the reason to call cygpath? What problem does this solve? I know little to nothing about cygwin. > The patch could be simpler if you consider that there aren't going to be > any directory name in the absolute path containing a single quote, a > double quote or a backslash (cygpath outputs forward slashes as filename > separator). Although single quotes, double quotes and backslash are > allowed filename characters under *nixy shells, autotools check for that > and prevent building with such a dir name within root directory. So all > the complication for handling ' " and \ is just overkill in this > case. However, the reason why I opted out to writing it this way, is > that I think that it is good to have some reference code for handling > absolute paths in any cases of bash ports, so this code could be reused > in another context than autotools as a reference bulletproof coding. I am not sure bbdb should take a lead here to provide solutions to such rather exotic problems. I am tempted to say: if someone really wants to put quotes into filenames be prepared for trouble. I see little point in trying to be smarter than autotools. If you want to provide a reference showing that such things *can* be done, it seems to me there must be better, more prominent places than bbdb. Roland