Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/env.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoray kavukcuoglu <koray@kavukcuoglu.org>2014-02-24 20:02:24 +0400
committerkoray kavukcuoglu <koray@kavukcuoglu.org>2014-02-24 20:02:24 +0400
commit5740bd55c2891e497f6f554b364075467ddddfb7 (patch)
tree8cde9294ac3d6518ed45fcef6628f66ebd2e517e
parent459ec7c8ec749fd1b744aac7a3a643a34389d370 (diff)
parent23608098586e8ccfc0292df382ff797b39c1990e (diff)
Merge pull request #2 from akfidjeland/topic-path-order
Changed the path and cpath order
-rw-r--r--init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 419e291..a0acb6d 100644
--- a/init.lua
+++ b/init.lua
@@ -280,6 +280,8 @@ if paths.dirp(localinstalldir) then
package.cpath = paths.concat(localinstalldir,'lib','lua','5.1','?.dylib') .. ';' .. package.cpath
end
+local origpath = package.path
+local origcpath = package.cpath
function loaddefaultlibs(loadwithimport)
if loadwithimport == nil then loadwithimport = false end
@@ -298,6 +300,10 @@ end
local loadwithimport = false
loaddefaultlibs(loadwithimport)
+-- undo path manipulation performed by dok
+package.path = origpath
+package.cpath = origcpath
+
_G._preloaded_ = {}
for k,v in pairs(_G) do
_G._preloaded_[k] = true