aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-11 06:18:30 +0000
committerhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-11 06:18:30 +0000
commit3cf8153e83fbd20e8de80c70049f1252b5286054 (patch)
treef7a67c12f5217b3c8f3e0d365edb8803beefd3e9
parent5e2f598508f8ddab5aaf8b9072f1c0cab249830d (diff)
downloadluarocks-3cf8153e83fbd20e8de80c70049f1252b5286054.tar.gz
luarocks-3cf8153e83fbd20e8de80c70049f1252b5286054.tar.bz2
luarocks-3cf8153e83fbd20e8de80c70049f1252b5286054.zip
Sync with unix version
git-svn-id: http://luarocks.org/svn/luarocks/trunk@87 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
-rw-r--r--src/luarocks/fs/win32.lua3
1 files changed, 2 insertions, 1 deletions
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)
61 assert(type(dest) == "string") 61 assert(type(dest) == "string")
62 62
63 local base = dir.base_name(file) 63 local base = dir.base_name(file)
64 local wrapname = dest.."/"..base..".bat" 64 local wrapname = fs.is_dir(dest) and dest.."/"..base or dest
65 wrapname = wrapname..".bat"
65 local wrapper = io.open(wrapname, "w") 66 local wrapper = io.open(wrapname, "w")
66 if not wrapper then 67 if not wrapper then
67 return nil, "Could not open "..wrapname.." for writing." 68 return nil, "Could not open "..wrapname.." for writing."