summaryrefslogtreecommitdiff
path: root/xmake/tools/ar.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-07-04 14:33:50 +0800
committerruki <[email protected]>2016-07-04 14:33:50 +0800
commit1ec6011956e78dedd7eea87f484b0a3c56cfef27 (patch)
treec762bc26e0483b9082ff70eed890b7bef468f98d /xmake/tools/ar.lua
parent2acc00d97e75abee7e1871f699c69136d37c4e49 (diff)
fix cd bug
Diffstat (limited to 'xmake/tools/ar.lua')
-rw-r--r--xmake/tools/ar.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/tools/ar.lua b/xmake/tools/ar.lua
index df9325763..6445c332b 100644
--- a/xmake/tools/ar.lua
+++ b/xmake/tools/ar.lua
@@ -69,7 +69,7 @@ function extract(libraryfile, objectdir)
libraryfile = path.absolute(libraryfile)
-- enter the object directory
- os.cd(objectdir)
+ local olddir = os.cd(objectdir)
-- extract it
os.run("%s -x %s", _g.shellname, libraryfile)
@@ -85,7 +85,7 @@ function extract(libraryfile, objectdir)
end
-- leave the object directory
- os.cd("-")
+ os.cd(olddir)
end
-- run command