UNC Pathname Handling within Applications

Thorsten Haude nedit@thorstenhau.de
Fri Jul 16 20:35:00 GMT 2004


Hi,

* Shankar Unni wrote (2004-07-16 20:36):
>Thorsten Haude wrote:
>
>>The path is also displayed at various places. The user might be
>>surprised to see surplus slashes.
>
>[Starting to drift OT, sorry..]
>
>Who's generating the surplus slashes? Is this because of trailing "/" in 
>paths, and you're internally compositing names somehow?

Yes, we never cared for that because we weren't aware of this leading
slash thing. (I wasn't at least, and never heard about it before.) So
we have to check all internals for problems.

There will probably also be problems with the toolkit.


>I thought the only names you would *show* to the user would be the names 
>of editor buffers, etc., something which the user has already specified 
>explicitly anyway. It's not like you're saying "nedit myfile", and 
>you're searching all over the filesystem to locate myfile..

The filename is used in several parts of the application. I expect
some of them to make false assumptions about leading slashes.


>I.e. if you're doing "prefix + basename", then the only normalization 
>should be between prefix and basename (i.e. strip trailing slashes (any 
>kind) from prefix, and append a "known slash" and basename).
>
>You shouldn't be doing any further normalization (e.g. /x/../y -> /y or 
>any such), because if it *is* a synthesized name, then there's great 
>value in knowing *how* the name was synthesized. Normalizing it loses 
>this information.

These are the things we have to think about, yes.


Thorsten
-- 
Getting a thrill out of some stupid quote is a sign of idiocy.
    - turmeric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20040716/a9d36989/attachment.sig>


More information about the Cygwin mailing list