209 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are |
209 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are |
210 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered |
210 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered |
211 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then |
211 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then |
212 # "foo.exe" is OK but "foo" is an error. |
212 # "foo.exe" is OK but "foo" is an error. |
213 # |
213 # |
214 # This test is therefore slightly more accurate than "test -f" to check for file precense. |
214 # This test is therefore slightly more accurate than "test -f" to check for file presence. |
215 # It is also a way to make sure we got the proper file name for the real test later on. |
215 # It is also a way to make sure we got the proper file name for the real test later on. |
216 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` |
216 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` |
217 if test "x$test_shortpath" = x; then |
217 if test "x$test_shortpath" = x; then |
218 # Short path failed, file does not exist as specified. |
218 # Short path failed, file does not exist as specified. |
219 # Try adding .exe or .cmd |
219 # Try adding .exe or .cmd |