Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
comp500 committed Feb 19, 2015
1 parent 1a3d214 commit 45840e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions require.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function require(...)
end
local traverse = function (travDir, name)
local file = travDir .. name
while (not fs.exists(file)) or travDir ~= "" do
while (not fs.exists(file)) and travDir ~= "" do
travDir = fs.getDir(travDir)
file = travDir .. name
end
Expand All @@ -28,7 +28,7 @@ function require(...)
if traversedir then
file = traverse(fs.getDir(reqloc), name)
if not fs.exists(file) then
if fs.exists(shell.resolveProgram(file))
if shell.resolveProgram(file) ~= nil and fs.exists(shell.resolveProgram(file)) then
file = shell.resolveProgram(file)
end
end
Expand Down

0 comments on commit 45840e4

Please sign in to comment.