[Libreoffice-commits] core.git: configure.ac
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 25 12:12:48 UTC 2020
configure.ac | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
New commits:
commit 2e619846cfe620826d3d77e4551a9af917cf96d9
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Sun Oct 25 13:02:51 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Sun Oct 25 13:12:08 2020 +0100
Improve the WSL cygpath emulation
Handle also Windows pathnames passed to it in mixed format, and Unix
pathnames for Windows files (starting with /mnt/).
Change-Id: I07a01b8680a6ed203e9fe44c37822e0490c3f296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104771
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/configure.ac b/configure.ac
index 74911610a3e4..10a199c975c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,7 +296,11 @@ if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then
fi
case "$input" in
- [[a-zA-Z]]:\\* | \\*)
+ /mnt/*)
+ # A Windows file in WSL format
+ input=$(wslpath -w "$input")
+ ;;
+ [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*)
# Already in Windows format
;;
/*)
@@ -317,7 +321,7 @@ if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then
# Print Unix path
case "$input" in
- [[a-zA-Z]]:\\* | \\*)
+ [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*)
wslpath -u "$input"
;;
/)
@@ -333,17 +337,21 @@ if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then
if test -n "$UNITTEST_WSL_CYGPATH"; then
BUILDDIR=.
+ # Nothing special with these file names, just arbitrary ones picked to test with
cygpath -d /usr/lib64/ld-linux-x86-64.so.2
cygpath -w /usr/lib64/ld-linux-x86-64.so.2
cygpath -m /usr/lib64/ld-linux-x86-64.so.2
cygpath -m -s /usr/lib64/ld-linux-x86-64.so.2
- cygpath -d /mnt/c/windows/system32/AboutSettingsHandlers.dll
+ # At least on my machine for instance this file does have an 8.3 name
+ cygpath -d /mnt/c/windows/WindowsUpdate.log
+ # But for instance this one doesn't
cygpath -w /mnt/c/windows/system32/AboutSettingsHandlers.dll
- cygpath -ws /mnt/c/windows/system32/AboutSettingsHandlers.dll
+ cygpath -ws /mnt/c/windows/WindowsUpdate.log
cygpath -m /mnt/c/windows/system32/AboutSettingsHandlers.dll
- cygpath -ms /mnt/c/windows/system32/AboutSettingsHandlers.dll
+ cygpath -ms /mnt/c/windows/WindowsUpdate.log
cygpath -u 'c:\windows\system32\AboutSettingsHandlers.dll'
+ cygpath -u 'c:/windows/system32/AboutSettingsHandlers.dll'
exit 0
fi
More information about the Libreoffice-commits
mailing list