Skip to content

Commit

Permalink
Fix code not working when using long file path
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 committed Aug 22, 2015
1 parent 33a7e22 commit e00f78c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions AIO_Client/AIO.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ local AIO_GetTimeDiff = os and os.difftime or function(_now, _then) return _now-
-- boolean value to define whether we are on server or client side
local AIO_SERVER = type(GetLuaEngine) == "function"
-- Client must have same version (basically same AIO file)
local AIO_VERSION = 1.7
local AIO_VERSION = 1.71
-- ID characters for client-server messaging
local AIO_ShortMsg = schar(1)..schar(1)
local AIO_Compressed = 'C'
Expand Down Expand Up @@ -820,7 +820,7 @@ end
-- Returns true if addon was added
function AIO.AddAddon(path, name)
if AIO_SERVER then
path = path or debug.getinfo(2, 'S').short_src
path = path or debug.getinfo(2, 'S').source:sub(2)
name = name or match(path, "([^/]*)$")
local code = AIO_ReadFile(path)
AIO.AddAddonCode(name, code)
Expand Down
4 changes: 2 additions & 2 deletions AIO_Server/AIO.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ local AIO_GetTimeDiff = os and os.difftime or function(_now, _then) return _now-
-- boolean value to define whether we are on server or client side
local AIO_SERVER = type(GetLuaEngine) == "function"
-- Client must have same version (basically same AIO file)
local AIO_VERSION = 1.7
local AIO_VERSION = 1.71
-- ID characters for client-server messaging
local AIO_ShortMsg = schar(1)..schar(1)
local AIO_Compressed = 'C'
Expand Down Expand Up @@ -820,7 +820,7 @@ end
-- Returns true if addon was added
function AIO.AddAddon(path, name)
if AIO_SERVER then
path = path or debug.getinfo(2, 'S').short_src
path = path or debug.getinfo(2, 'S').source:sub(2)
name = name or match(path, "([^/]*)$")
local code = AIO_ReadFile(path)
AIO.AddAddonCode(name, code)
Expand Down

0 comments on commit e00f78c

Please sign in to comment.