Change the working directory of a function or coroutine
#4
(06-06-2015, 09:37 AM)worktycho Wrote: I hope this isn't possible. The working directory is process global, so the change would effect other plugins in strange ways.
I'm wondering what dofile is doing then. When you use for example: 'dofile("folder1/folder2/file1.lua")' then everything in file1.lua is executed in folder1/folder2.

But it turns out I have to rewrite those functions anyway, because I have to make them parse the file first.

worktycho Wrote:Off topic, but I really don't like the idea of a custom HTTP server. I've looked through your code, and already noticed that it doesn't handle uri encoding, and it has a path traversal vulnerability, as you don't pass a deliminator to StringSplit on host.lua line 25. Make sure you also handle \ for the path to fix problems on windows.
Of course, this is just me having fun with browsers and seeing how they work ^^
Reply
Thanks given by:


Messages In This Thread
RE: Change the working directory of a function or coroutine - by NiLSPACE - 06-06-2015, 06:18 PM



Users browsing this thread: 1 Guest(s)