aboutsummaryrefslogtreecommitdiff
path: root/pipermail/nel/2001-March/000365.html
blob: 5730e6b9f393c6903b1e544414c60fe75d196384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Nel] 'data/' bug</TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:lecroart%40nevrax.com">
   <LINK REL="Previous"  HREF="000363.html">
   <LINK REL="Next" HREF="000366.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Nel] 'data/' bug</H1>
    <B>Vianney Lecroart</B> 
    <A HREF="mailto:lecroart%40nevrax.com"
       TITLE="[Nel] 'data/' bug">lecroart@nevrax.com</A><BR>
    <I>Wed, 7 Mar 2001 14:25:17 +0100</I>
    <P><UL>
        <LI> Previous message: <A HREF="000363.html">[Nel] here's the landscape.cpp patch I used</A></li>
        <LI> Next message: <A HREF="000366.html">[Nel] newbies about packet schema</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#365">[ date ]</a>
              <a href="thread.html#365">[ thread ]</a>
              <a href="subject.html#365">[ subject ]</a>
              <a href="author.html#365">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>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 &quot;&quot;, first it calls fileExists(&quot;&quot;) that
returns false.
Next step, it tries with the first directory in his list,
fileExists(&quot;data/&quot;+&quot;&quot;); On windows, the OS can't open the directory
(&quot;data/&quot;)
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&amp; 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: <A HREF="http://ace.planet-d.net">http://ace.planet-d.net</A>
www.geekcode.com: GCS/E d- s+++: a-- C+++$ UL++ P- L+++&gt;+$ E+&gt;- 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?



</pre>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI> Previous message: <A HREF="000363.html">[Nel] here's the landscape.cpp patch I used</A></li>
	<LI> Next message: <A HREF="000366.html">[Nel] newbies about packet schema</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#365">[ date ]</a>
              <a href="thread.html#365">[ thread ]</a>
              <a href="subject.html#365">[ subject ]</a>
              <a href="author.html#365">[ author ]</a>
         </LI>
       </UL>
</body></html>