Scott Johnson wrote:
> Since eridanus.exe is in bin/, I mount it using the following:
> vfs->Mount("/levels/", "..$/data$/levels$/world.zip");

Note that the VFS portable way to refer to the parent directory is "$.." 
rather than "..". Ditto for the current working directory, "$." rather 
than ".".

> I tried to troubleshoot this by seeing where the initial 
> path is by default, and I used this code:
> csRef<iDataBuffer> db = vfs->Expand("."); // expands to "/"
> csRef<iDataBuffer> db2 = vfs->GetRealPath(db->GetData());

I think that you are confusing the concept of current working directory 
(".") with application directory (where the .exe resides). Running an 
application does not automatically change your current working directory 
to that of the .exe file. As a simple example, at your DOS prompt, you 
may 'cd c:\temp', which makes your current working directory c:\temp. 
When you then run a program c:\devel\bin\foo.exe, your working directory 
is still c:\temp, and ".." is c:\ (the parent of c:\temp), not c:\devel 
(the parent of c:\devel\bin).

What you probably want in this case is $^ which is the VFS shorthand for 
the directory in which the application resides. For the development 
scenario you describe, "$^$..$/data$/levels$/world.zip" seems likely to 
do what you desire.

-- ES


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to