![]() The extractFilePath function pulls a path string out of a filename. The functions extractFilePath, isRelativePath, and currentDir are not Lua functions you will have to write them yourself. ![]() Return orgDoFile(filename) -proper tail call.ĭofile = CreateDoFile() //Override the old. Store the path in a global, overwriting the previous value. Local pathToFile = extractFilePath(filename) If(filename) then -can be called with nil. The overriding code would look something like this: local function CreateDoFile() If that was a relative path, it has no idea how it was converted to an absolute path. Even the debug.getinfo method won't work, because it will only return the string passed to dofile. ![]() The only reliable way to get what you want is to replace dofile with your own version of this function.
0 Comments
Leave a Reply. |