aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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