aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-08-26 18:31:21 +0000
committerhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-08-26 18:31:21 +0000
commit2852e64fe91134e307908c9245210115b07b2e70 (patch)
treeb70e9c3b52adc710270e7ae17938eb71a97f29a3 /src
parent284bf00bb2fa157063ce8d5dc58e47d38eea8209 (diff)
downloadluarocks-2852e64fe91134e307908c9245210115b07b2e70.tar.gz
luarocks-2852e64fe91134e307908c9245210115b07b2e70.tar.bz2
luarocks-2852e64fe91134e307908c9245210115b07b2e70.zip
fix use of relative paths
git-svn-id: http://luarocks.org/svn/luarocks/trunk@50 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/add.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/add.lua b/src/luarocks/add.lua
index 96099d36..457852be 100644
--- a/src/luarocks/add.lua
+++ b/src/luarocks/add.lua
@@ -67,6 +67,8 @@ local function add_file_to_server(refresh, rockfile, server)
67 return nil, "Could not find "..rockfile 67 return nil, "Could not find "..rockfile
68 end 68 end
69 69
70 local rockfile = fs.absolute_name(rockfile)
71
70 local local_cache, protocol, server_path, user, password 72 local local_cache, protocol, server_path, user, password
71 if refresh then 73 if refresh then
72 local_cache, protocol, server_path, user, password = refresh_local_cache(server, cfg.upload_user, cfg.upload_password) 74 local_cache, protocol, server_path, user, password = refresh_local_cache(server, cfg.upload_user, cfg.upload_password)
@@ -74,8 +76,6 @@ local function add_file_to_server(refresh, rockfile, server)
74 local_cache, protocol, server_path, user, password = split_server_url(server, cfg.upload_user, cfg.upload_password) 76 local_cache, protocol, server_path, user, password = split_server_url(server, cfg.upload_user, cfg.upload_password)
75 end 77 end
76 fs.change_dir(local_cache) 78 fs.change_dir(local_cache)
77
78 local rockfile = fs.absolute_name(rockfile)
79 print("Copying file "..rockfile.." to "..local_cache.."...") 79 print("Copying file "..rockfile.." to "..local_cache.."...")
80 fs.copy(rockfile, local_cache) 80 fs.copy(rockfile, local_cache)
81 81