>From 8372b8c8f82d1a3680dd288da68a786a02329213 Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Tue, 31 Aug 2010 18:38:42 +0200 Subject: [PATCH] Handle odd winepath failures. * lib/ar-lib (func_file_conv): winepath can exit with zero exit status but empty result, and can return a basically unconverted path, but prefixed with \\?\unix. Treat both of these as failure and retain the original file name. * lib/compile (func_file_conv): Likewise. Suggested by Ralf Wildenhues after reports of similar problems elsewhere from Charles Wilson and Roumen Petrov. Signed-off-by: Peter Rosin --- ChangeLog | 11 +++++++++++ lib/ar-lib | 6 +++++- lib/compile | 6 +++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a054e2..f13565c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-08-31 Peter Rosin + + Handle odd winepath failures. + * lib/ar-lib (func_file_conv): winepath can exit with zero exit + status but empty result, and can return a basically unconverted + path, but prefixed with \\?\unix. Treat both of these as failure + and retain the original file name. + * lib/compile (func_file_conv): Likewise. + Suggested by Ralf Wildenhues after reports of similar problems + elsewhere from Charles Wilson and Roumen Petrov. + 2010-08-16 Peter Rosin Optimize compile script on MSYS. diff --git a/lib/ar-lib b/lib/ar-lib index ef03430..0f2a802 100755 --- a/lib/ar-lib +++ b/lib/ar-lib @@ -70,7 +70,11 @@ func_file_conv () file=`cygpath -m "$file" || echo "$file"` ;; wine) - file=`winepath -w "$file" || echo "$file"` + wfile=`winepath -w "$file" 2>/dev/null || echo "$file"` + case $wfile in + '\\?\unix'* | '') ;; + *) file=$wfile ;; + esac ;; esac ;; diff --git a/lib/compile b/lib/compile index b6419ce..969a92e 100755 --- a/lib/compile +++ b/lib/compile @@ -72,7 +72,11 @@ func_file_conv () file=`cygpath -m "$file" || echo "$file"` ;; wine/*) - file=`winepath -w "$file" || echo "$file"` + wfile=`winepath -w "$file" 2>/dev/null || echo "$file"` + case $wfile in + '\\?\unix'* | '') ;; + *) file=$wfile ;; + esac ;; esac ;; -- 1.7.1