File: paths.lua

package info (click to toggle)
instead 3.5.2%2Bdfsg-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,316 kB
  • sloc: ansic: 28,336; sh: 452; makefile: 236
file content (9 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
-- nothing todo in stead2 ;)
local instead_gamepath = instead_gamepath
io.open = stead.hook(io.open, function(f, path, acc, ...)
	if stead.type(path) == 'string' and path:sub(1, 1) ~= '/' and not
		(path:sub(2, 2) == ':' and path:find("^[A-Z]", 1) == 1) then
		path = instead_gamepath()..'/'..path
	end
	return f(path, acc, ...)
end)