Overview
| Artifact ID: | fe30ea0d739a2509f5d121499df0779c54635a10 |
|---|---|
| Ticket: | 931847ffffffffffffffffffffffffffffffffff
TclFSNormalizeToUniquePath - incomplete? |
| User & Date: | vincentdarley on 2004-04-09 16:31:26 |
Changes
- icomment:
Logged In: YES user_id=32170 One relevant issue is that TFSNToUniquePath will only want to call PathInFilesystem() for paths that it knows are normalized up to a certain point, (and only wants to know if the path up to that point is in the given fs). I.e. in my example below, we'll want to call PathInFilesystem(C:/foo/bar.zip/), and we know that that path is already normalized, which means we can use 'TclFSMakePathFromNormalized' -(we don't actually want the trailing '/', but that's a detail). This means that we will actually want to construct a new (!) pathPtr containing just this path, which we actually create in the 'pure-normalized' form. Unfortunately, the moment it has been recognized, we throw it away. This means in your arbitrarily nested filesystem, normalization will be a not-stunningly efficient process (but perhaps that doesn't matter too much). This suggests in the future we might want to extend the FS interface to provide a more flexible pathInFilesystem proc (Note: we have a private FS_VERSION_2 we can play with here). Finally, concerning the overlap between the Absolute/Unique routines, yes that is an issue. I should clarify that the Absolute routine is there _not_ to remove symlinks, but rather to remove './' and '../' sequences (and this may result in removing _some_ symlinks, if they are before a '../' sequence). Given your desire to go down the path of arbitrarily nestable/symlinkable filesystems, I think a result of that is we will have to refactor the two functions -- since, in particular, '../' sequences can be re-introduced. p.s. I'm largely away for the next week.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"