Page 1 of 1
VFS fun again
Posted: 24 May 2014, 17:41
by gajop
Code: Select all
-- all run in unsynced
local projectDir = "projects/Project-1"
Spring.CreateDir(projectDir) -- created in ~/.config/spring (on linux)
Spring.CreateDir(projectDir .. "/triggers") -- created in ~/.config/spring/projects/Project-1/triggers
Spring.Echo(VFS.FileExists(projectDir, VFS.RAW)) --result is false regardless if VFS.RAW is passed or not)
table.echo(VFS.SubDirs("")) --table doesn't contain the "projects" dir

Re: VFS fun again
Posted: 25 May 2014, 00:39
by Beherith
And what is this?
Re: VFS fun again
Posted: 25 May 2014, 01:15
by FLOZi
Seen as it is gajop, most likely either ChiliLobby or ScenEd problems with VFS (again)
Re: VFS fun again
Posted: 25 May 2014, 01:18
by gajop
Me going insane doing VFS stuff, but it turns out I was actually running this in synced, so it was mostly my error.
Will test thoroughly tomorrow.
Re: VFS fun again
Posted: 25 May 2014, 11:50
by gajop
Oh and another thing regarding VFS.FileExists, it seems to only work for files and not dirs?
LuaVFS.cpp ->
FileHandler.cpp -> ... ->
FileSystemAbstraction.cpp and what never gets invoked is
DirExists.
Should we add a new VFS.DirExists or make the current .FileExists work for both files and dirs?