From 3cf8153e83fbd20e8de80c70049f1252b5286054 Mon Sep 17 00:00:00 2001 From: hisham Date: Sun, 11 Oct 2009 06:18:30 +0000 Subject: Sync with unix version git-svn-id: http://luarocks.org/svn/luarocks/trunk@87 9ca3f7c1-7366-0410-b1a3-b5c78f85698c --- src/luarocks/fs/win32.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua index d005781e..7b478cd3 100644 --- a/src/luarocks/fs/win32.lua +++ b/src/luarocks/fs/win32.lua @@ -61,7 +61,8 @@ function wrap_script(file, dest) assert(type(dest) == "string") local base = dir.base_name(file) - local wrapname = dest.."/"..base..".bat" + local wrapname = fs.is_dir(dest) and dest.."/"..base or dest + wrapname = wrapname..".bat" local wrapper = io.open(wrapname, "w") if not wrapper then return nil, "Could not open "..wrapname.." for writing." -- cgit v1.2.3-55-g6feb