nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nel] 'data/' bug


From: Vianney Lecroart
Subject: [Nel] 'data/' bug
Date: Wed, 7 Mar 2001 14:25:17 +0100

Hi there!

We, at last, understood the problem of the 'data/' bug on linux.
In fact, in our rawdatafiles, there are some empty file names and in our
program, we try to find where these files are located.
For that, we use a function (CPath::lookup()) that tries to find the file in
all directories provided before by the user.
To know if a file exists, we try to open it and if the opening success, we
return true (CFile::fileExists()).
When the prog tries to find the file "", first it calls fileExists("") that
returns false.
Next step, it tries with the first directory in his list,
fileExists("data/"+""); On windows, the OS can't open the directory
("data/")
so it returns false. On linux, it can, so it returns true and the program
tries to read the directory as if it was
a texture, and of course, it fails (end of file).

We fixed the problem by adding this next line in the top of the function
string CPath::lookup( const string& filename ) in path.cpp:

 if(filename.empty())
  throw EPathNotFound( filename );

Of course, we put it on cvs and it will be synchronized this night (GMT+1).


Vianney Lecroart
---
lead network programmer / nevrax.com
icq#: 6870415
homepage: http://ace.planet-d.net
www.geekcode.com: GCS/E d- s+++: a-- C+++$ UL++ P- L+++>+$ E+>- W++ N+ o? K-
w++$ O- M- V- PS- PE? Y PGP t 5? X+ R- tv++ b- DI D+ G e++ h+ r-- y?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]