diff options
author | Sebastian Thomschke <sebthom@users.noreply.github.com> | 2017-10-04 16:05:00 +0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-03-12 21:03:50 -0300 |
commit | 8ad159609280c1ef50e741ac44ccf5300f09b6bc (patch) | |
tree | bf70d87177288a7515c72aa4087bdbe3fc6e6088 /COPYING | |
parent | 3f60bec6a04eabfe1e86547f49708ea33b319849 (diff) | |
download | luarocks-8ad159609280c1ef50e741ac44ccf5300f09b6bc.tar.gz luarocks-8ad159609280c1ef50e741ac44ccf5300f09b6bc.tar.bz2 luarocks-8ad159609280c1ef50e741ac44ccf5300f09b6bc.zip |
Fix detection of directories on Windows
Function tools.delete performs a test to determine if a path is a file or a directory to select the appropriate delete command rmdir vs del.
The current test however results in rmdir being used on files too, which then results in a build abortion with error "The directory name is invalid.".
E.g.
if exist "c:\luarocks\share\lua\5.2\luasocket_3_0rc1_2-socket.lua\" ( echo "I am a folder" ) else ( echo "I am a file" )
wrongly prints "I am a folder" (tested on Windows 10)
Whereas
if exist "c:\luarocks\share\lua\5.2\luasocket_3_0rc1_2-socket.lua\*" ( echo "I am a folder" ) else ( echo "I am a file" )
correctly prints "I am a file" (tested on Windows 10)
This fixes #670
(Also see https://stackoverflow.com/a/1466528/1793220 )
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions