[win32] Probably bug: tracking permissions bits on windows

Alexey Shamrin shamrin at gmail.com
Mon Nov 7 06:58:03 GMT 2005


On 06/11/05, Jan Hudec <bulb at ucw.cz> wrote:
> On Sat, Nov 05, 2005 at 21:14:25 +0300, Alexey Shamrin wrote:
> > On 05/11/05, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> > > I don't know exactly what to do with symlinks.  It may make sense to
> > > create a plaintext file on disk with the symlink target as its text. The
> > > WindowsWorkingTree would cause it to appear to bzrlib as a symlink.
> > > That would allow Windows users to manipulate the symlink target
> > > directly, and provide a dummy file, making it harder to accidentally
> > > reuse that filename.
> >
> > It's interesting to look how Cygwin handles symlinks:
> >
> > >>> os.chdir('c:/soft/cygwin/bin/')
> > >>> file('gunzip.exe','rb').read()
> > '!<symlink>gzip.exe\x00'
>
> My cygwin actually creates .lnk files, that behave like symlinks to the
> limit permitted by windows. That's Win XP SP2 and recently updated cygwin.
> It would be nicest if bzr actually managed to create symlinks like that.
>
> The .lnks created by cygwin work for other programs well, but I was not able
> to create a .lnk manually that cygwin would see as a symlink.

It turned out that in Cygwin there are actually two types of symlink
implementation [1]. The first type -- old style -- is the example I
showed for gunzip (I didn't try creating symlink myself, I just looked
at cygwin/bin directory -- it uses old style symlink implementation).
The second type -- .lnk file -- is what ln -s creates by default [2].

[1] http://cygwin.com/faq/faq.api.html#faq.api.symlinks
[2] http://cygwin.com/faq/faq.using.html#faq.using.shortcuts

--
Alexey




More information about the bazaar mailing list