From 2852e64fe91134e307908c9245210115b07b2e70 Mon Sep 17 00:00:00 2001 From: hisham Date: Wed, 26 Aug 2009 18:31:21 +0000 Subject: fix use of relative paths git-svn-id: http://luarocks.org/svn/luarocks/trunk@50 9ca3f7c1-7366-0410-b1a3-b5c78f85698c --- src/luarocks/add.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) return nil, "Could not find "..rockfile end + local rockfile = fs.absolute_name(rockfile) + local local_cache, protocol, server_path, user, password if refresh then 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) local_cache, protocol, server_path, user, password = split_server_url(server, cfg.upload_user, cfg.upload_password) end fs.change_dir(local_cache) - - local rockfile = fs.absolute_name(rockfile) print("Copying file "..rockfile.." to "..local_cache.."...") fs.copy(rockfile, local_cache) -- cgit v1.2.3-55-g6feb