Skip to content

Commit

Permalink
Fix requiredir (#1843)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 authored Aug 29, 2024
1 parent ebd5b29 commit 31cb00d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/starfall/libs_sh/builtins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ function builtins_library.requiredir(path, loadpriority)

path = SF.ChoosePath(path, string.GetPathFromFilename(SF.GetExecutingPath() or ""), function(testpath)
for file in pairs(instance.scripts) do
if testpath == string.GetPathFromFilename(file) then
if testpath == string.sub(string.GetPathFromFilename(file), 1, -2) then
return true
end
end
Expand Down Expand Up @@ -831,7 +831,7 @@ function builtins_library.dodir(path, loadpriority)

path = SF.ChoosePath(path, string.GetPathFromFilename(SF.GetExecutingPath() or ""), function(testpath)
for file in pairs(instance.scripts) do
if testpath == string.GetPathFromFilename(file) then
if testpath == string.sub(string.GetPathFromFilename(file), 1, -2) then
return true
end
end
Expand Down

0 comments on commit 31cb00d

Please sign in to comment.