On Thu, Jun 24, 2010 at 10:33 AM, Bert Freudenberg bert@freudenbergs.dewrote:
On 24.06.2010, at 19:30, Henrik Johansen wrote:
There's a bug in the alias resolution sqGetFilenameFromString in
sqUnixMain.c
In the line filenameLength = readLink(aCharBuffer, aCharBuffer, MAXPATHLEN) It replaces the old link path with the resolved link path, however links
may be relative, eg. /bin/sh linking to bash rather than /bin/bash.
Thus, file opening, and other operations using this function will fail if
encountering a relative link.
F.ex. print (on Ubuntu, where sh -> dash):
|openedRelative| openedRelative := nil. [FileStream readOnlyFileNamed: '/bin/sh' do: [:fs | openedRelative :=
true]] on: FileDoesNotExistException do: [openedRelative := false].
openedRelative
and you get false.
Cheers, Henry
Yeah I've been bitten by that too. Do you have a patch? Actually, Ian prefers to be sent a fully patched file ...
You'll find its fixed in the Cog sources. Alas there are other changes there-in, but at least that function is not affected by other changes.
- Bert -