Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2000-09

Message *bounced*

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

O/T-Track+ 2.66b

************************************************************************ *** WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING *** ************************************************************************ *
* The e-mail-message appended below is list- or mailserver-related *
* That type of mail will by definition not be processed on this system
* and in general is not accepted in the fidonet.org-domain. *
* To avoid these bouncings the listkeeper is kindly requested to
* remove any subscription coming from a z2.fidonet.org-style address. *
* If you have reason to believe your message was removed without due
* reason then kindly inform ''.
*
************************************************************************

From: Lee, John @2:292/862
To: fpc-develop @2:5020/1305.201
Subj.: RE: [fpc-devel]TP compatible fsplit()
Dated: 05 Sep 00 11:46:27
[processed here: 06 Sep 00 09:58:39]

@TOPT 201
@INTL 2:5020/1305 2:292/862
@MSGID: knuth.logica.co.uk 4b4f5f06
@REPLYADDR:
@REPLYTO: UUCP
@PID: Internet Mail Service (5.5.2448.0)
@CHRS: LATIN-1 2
@RFC-Received: from vekoll.saturnus.vein.hu (
[193.6.40.1]) by infomag.iguana.be (8.9.3/8.9.3) with ESMTP id UAA16382 for ; Tue, 5 Sep 2000 20:47:07 +0200
@RFC-Received: from vekoll.saturnus.vein.hu ( [127.0.0.1]) by vekoll.saturnus.vein.hu (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA26405; Tue, 5 Sep 2000 11:46:48 +0200
@RFC-Received: from cav.logica.co.uk (cav.logica.co.uk [158.234.10.66]) by vekoll.saturnus.vein.hu (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAB26390 for ; Tue, 5 Sep 2000 11:46:44 +0200
@RFC-Received: from eckert.logica.co.uk (eckert.logica.co.uk [158.234.10.17]) by cav.logica.co.uk (8.9.1/8.9.1) with ESMTP id KAA07171 for ; Tue, 5 Sep 2000 10:46:37 +0100
@RFC-Received: by eckert.logica.co.uk with Internet Mail Service (5.5.2448.0) id <SH580LX4>; Tue, 5 Sep 2000 10:46:34 +0100
@RFC-Message-ID:
@RFC-Sender:
@RFC-Errors-To:
@RFC-X-Mailman-Version: 1.0rc2
@RFC-List-Id: FPC developers' list <fpc-devel.lists.freepascal.org> @RFC-X-BeenThere:
From: "Lee, John"
To: "''"
Reply-To:

Marco, my main concern (& Thomas's comments) refer to the program I included, which was a 'real' one to do a real task eg recursive directory search, didn't work for win32 & go32 in dos box (even for normal 8.3 files, let alone for funny names or long names) but did for tp...IMO we need to try to fix this, with minimum/(ideally 0)changes to the source...Otherwise we'll just have to flag it as another incompatibility. John

Earlier message 68 lines
-----Original Message----- From: Sent: 05 September 2000 09:46 To: Subject: Re: [fpc-devel]TP compatible fsplit() > such > > > a name) it produces garbage. It's the 'compatiblest' way I found, at > least > > > Lee John's recursive directory search works then with LFN too. > > > > Why that? If some idiot calls a file "readme..txt" and you try to get > > the extension, you get ".txt", and conclude you can't open it with > > notepad? > > You get '..txt' in this case. The extension is always including the point. > Btw, Windows accepts a file with '..txt' being a '.txt' file. (e.g. it uses > a routine to detect extensions similar to your old routine) Then maybe we should create such a routine in the rtl. SHould be easy. > > The points remain a problem. Both if you stick them with the name or > > the extension (and can't leave them out, because you can't > > concatenate it back together again) > > > > Marco van de Voort ( or ) > > But consider the directory '..' (previous directory) ! TP puts everything > after the first dot into the extension (e.g both dots). This is usually > checked for in directory traversals, because both this one and '.' have to > be ignored (the exit clause in the recursive call). Less important for compability reasons. You usually use fsplit to find paths (and then discard the filename etc parts), or split the filename into filename and extension. > Else you get a dot in the name and a dot in the extension and checks fail > resulting in an endless loop until the stack overflows. Seems through, but I don't see this actually happen. While the other might break code. (btw, actually FPC > should issue an RTE but not crash back to Windows when compiled as a GO32V2 > program; same for the Win32 compiled program) You mean when the stack overflows? > Exactly this is the problem. Not a person creating weird file names. > I already said that I don't really like it (because it's not the way OSes > handle this too). > > TP rtl is aching everywhere, don't tell me. > > You could add a simple check for '..' too overriding the whole other split > function - but that's even more a hack. > This solution is best imho. > > Or do you have a better idea ? See his code and try. (I am not an expert in > dir traversals, I just made it to work - but I think the checks done are > correct) I don't think the ".." directory case is a problem.

Reply by email