This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UNC Pathname Handling within Applications


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?

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..

If the name is something the user is already specifying as a relative or absolute path, then there's no need to further normalize them.

If you *do* ever show to the user a path that nedit has composed itself (say, some property display, like "where is the foobar package that is automatically loaded?"), then the right thing is to only normalize *at the point where you do the composition*.

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.


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]