Re: odd behavior of symlinks on Win XP
On Thu, 3 Feb 2005, Jeff.Hodges wrote: On Tue, Feb 01, 2005 at 11:43:04AM -0800, Jeff.Hodges wrote: On Jan 31 12:25, Jeff.Hodges wrote: corinna-cygwin said: There's a patch in current Cygwin CVS which should solve the icon problem. Super. Tho, will fixing the icon problem also fix the behavior dichotomy between Explorer and Open/Save dialogs (which I noted in my original posting in this thread)? Yes. Great, thanks :) When might this find it's way into the setup.exe install? Some time in the next year, for sure. it'd be helpful to know in which package the cygwin symlink functionality is materialized in, so as to watch for appropriate update announcement(s). I suspect it's embodied at least in both coreutils and cygwin1.dll, but am not sure. might somone endeavor to answer this? thanks, It's all contained in a nifty little package called cygwin. Be sure to watch for updates on this one (or try a snapshot). Igor P.S. http://cygwin.com/acronyms/#PCYMTNQREAIYR -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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/
RE: odd behavior of symlinks on Win XP
it'd be helpful to know in which package the cygwin symlink functionality is materialized in, so as to watch for appropriate update announcement(s). I suspect it's embodied at least in both coreutils and cygwin1.dll, but am not sure. might somone endeavor to answer this? thanks, JeffH Cygwin1.dll. -- Gary R. Van Sickle -- 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/
Re: odd behavior of symlinks on Win XP
On Tue, Feb 01, 2005 at 11:43:04AM -0800, [EMAIL PROTECTED] wrote: On Jan 31 12:25, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] said: There's a patch in current Cygwin CVS which should solve the icon problem. Super. Tho, will fixing the icon problem also fix the behavior dichotomy between Explorer and Open/Save dialogs (which I noted in my original posting in this thread)? Yes. Great, thanks :) When might this find it's way into the setup.exe install? Some time in the next year, for sure. it'd be helpful to know in which package the cygwin symlink functionality is materialized in, so as to watch for appropriate update announcement(s). I suspect it's embodied at least in both coreutils and cygwin1.dll, but am not sure. might somone endeavor to answer this? thanks, JeffH -- 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/
Re: odd behavior of symlinks on Win XP
On Jan 31 12:25, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] said: There's a patch in current Cygwin CVS which should solve the icon problem. Super. Tho, will fixing the icon problem also fix the behavior dichotomy between Explorer and Open/Save dialogs (which I noted in my original posting in this thread)? Yes. Great, thanks :) When might this find it's way into the setup.exe install? thanks again, JeffH -- 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/
Re: odd behavior of symlinks on Win XP
On Tue, Feb 01, 2005 at 11:43:04AM -0800, [EMAIL PROTECTED] wrote: On Jan 31 12:25, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] said: There's a patch in current Cygwin CVS which should solve the icon problem. Super. Tho, will fixing the icon problem also fix the behavior dichotomy between Explorer and Open/Save dialogs (which I noted in my original posting in this thread)? Yes. Great, thanks :) When might this find it's way into the setup.exe install? Some time in the next year, for sure. cgf -- 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/
Re: odd behavior of symlinks on Win XP
[EMAIL PROTECTED] said: There's a patch in current Cygwin CVS which should solve the icon problem. Super. Tho, will fixing the icon problem also fix the behavior dichotomy between Explorer and Open/Save dialogs (which I noted in my original posting in this thread)? If you want to use a shortcut in Cygwin and in native Windows, create it in Cygwin and don't touch it. Indeed, and that appears to work fine on Win2k but not XP (yet). JeffH -- 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/
Re: odd behavior of symlinks on Win XP
On Jan 31 12:25, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] said: There's a patch in current Cygwin CVS which should solve the icon problem. Super. Tho, will fixing the icon problem also fix the behavior dichotomy between Explorer and Open/Save dialogs (which I noted in my original posting in this thread)? Yes. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- 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/
Re: odd behavior of symlinks on Win XP
On Jan 27 14:16, Jan Hlavacek wrote: I am not on the list, but I hope this will get through. I came across this discussion while I was searching for an answer to similar problem. There are a couple of postings in the ML archives, all from this month, which should explain the behaviour pretty well. There's a patch in current Cygwin CVS which should solve the icon problem. But as soon as you change the icon, the shortcut is changed by Windows in a way which invalidates it as symlink for Cygwin. That's nothing we can change without breaking other things. If you want to use a shortcut in Cygwin and in native Windows, create it in Cygwin and don't touch it. [FAQ] Since version 1.3.0, Cygwin treats shortcuts as symlinks. I'll change the text in the FAQ. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- 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/
Re: odd behavior of symlinks on Win XP
Hi, I am not on the list, but I hope this will get through. I came across this discussion while I was searching for an answer to similar problem. Maybe describing my experience will help you figure out what is going on. Unfortunately, I have absolutely no experience with windows programming, so I can only help as a tester. Anyway, I use the latest cygwin (1.5.something, I just upgraded yesterday), and this is what happens with my symlinks: 1) create a symlink: ln -s yady yada 2) now I can do ls yada, cd yada etc. 3) open current directory in explorer, the icon for yada is the default unknown file icon, but uther than that, it works. 4) try to change the icon of yada, doesn't work because yada is readonly, uncheck the readonly option, change the icon and apply. 5) go back to bash. Now yada is gone, there is yada.lnk instead. In addition, cd yada.lnk doesn't work. 6) renaming yada.lnk to yada doesn't help. I think the problem in part 5 is related to the following problem. According to the cygwin FAQ at cygwin.com/faq/ cygwin should understand explorer's shortcuts: --- begin text pasted from the FAQ: Question: Why can't I cd into a shortcut to a directory? Answer: This is only valid up to but not including version 1.3.0: Cygwin does not follow MS Windows Explorer Shortcuts (*.lnk files). It sees a shortcut as a regular file and this you cannot cd into it. Some people have suggested replacing the current symbolic link scheme with shortcuts. The major problem with this is that .LNK files would then be used to symlink Cygwin paths that may or may not be valid under native Win32 non-Cygwin applications such as Explorer. Since version 1.3.0, Cygwin treats shortcuts as symlinks. --- end text pasted from the FAQ I found this not to be the case on Win XP. As mentioned above, I have cygwin 1.5.something and I *cannot* cd to explorer shortcuts. Also ls just shows the shortcut as a file, instead of listing the directory. Aparently MS did something in XP that break the compatibility of cygwin with explorer shortcuts. -- Jan Hlavacek Department of Mathematics 964-2004 -- 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/
Re: odd behavior of symlinks on Win XP SP2
I'm glad that you're talking about us as a group. Anybody interested in tracking that down? I'm not in a position to hack code on this unfortunately, but I can offer to test. I suspect it's important in the longer term to track this down because they (MSFT) ~could~ make further changes down the road that break cygwin-created symlinks altogether (from the windoze perspective), which'd more than just annoying. JeffH -- 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/
Re: odd behavior of symlinks on Win XP SP2
On Mon, Jan 17, 2005 at 08:25:26AM -0800, [EMAIL PROTECTED] wrote: I'm glad that you're talking about us as a group. Anybody interested in tracking that down? I'm not in a position to hack code on this unfortunately, but I can offer to test. I suspect it's important in the longer term to track this down because they (MSFT) ~could~ make further changes down the road that break cygwin-created symlinks altogether (from the windoze perspective), which'd more than just annoying. No, Microsoft is not going to break things so that cygwin's symlinks no longer operate. Cygwin understands its own version of symlinks very well. cgf -- 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/
Re: odd behavior of symlinks on Win XP SP2
I suspect it's important in the longer term to track this down because they (MSFT) ~could~ make further changes down the road that break cygwin-created symlinks altogether (from the windoze perspective), which'd more than just annoying. No, Microsoft is not going to break things so that cygwin's symlinks no longer operate. Cygwin understands its own version of symlinks very well. This comment is ridiculous. He clearly complained about MS-Software that cannot handle cygwin-created links, and you're talking about cygwin understand its own symlinks - well, think about it again. -- 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/
Re: odd behavior of symlinks on Win XP SP2
On Mon, Jan 17, 2005 at 10:33:47PM +0100, Sven K?hler wrote: I suspect it's important in the longer term to track this down because they (MSFT) ~could~ make further changes down the road that break cygwin-created symlinks altogether (from the windoze perspective), which'd more than just annoying. No, Microsoft is not going to break things so that cygwin's symlinks no longer operate. Cygwin understands its own version of symlinks very well. This comment is ridiculous. He clearly complained about MS-Software that cannot handle cygwin-created links, and you're talking about cygwin understand its own symlinks - well, think about it again. Apologies. I took the word altogether to mean completely but obviously missed the meaning implied by from the windoze perspective. cgf -- 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/
Re: odd behavior of symlinks on Win XP SP2
[EMAIL PROTECTED] said: He clearly complained about MS-Software that cannot handle cygwin-created links, and you're talking about cygwin understand its own symlinks correct. thanks. [EMAIL PROTECTED] said: Apologies. I took the word altogether to mean completely but obviously missed the meaning implied by from the windoze perspective. accepted understood. thanks. So, again, from the perspective of having cygwin-created symlinks that transparently behave as windows shortcuts, they (cygwin-created symlinks) are presently half-broken on XP. And if MSFT were to for some reason align their explorer code to match their Open-Save dialog code wrt how they treat (and discriminate between) shortcuts, cygwin-created symlink/shortcuts would likely quit working entirely *in the windows world* (they'd of course likely to continue to work fine in the cygwin world). If this were to come to pass and not be addressed by the cygwin community, then it wouldn't make any sense to have the the default (or even option) of creating cygwin symlinks as winsymlinks. This would be a loose, imv. thanks, JeffH -- 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/
Re: odd behavior of symlinks on Win XP SP2
[EMAIL PROTECTED] said: If this were to come to pass and not be addressed by the cygwin community, then it wouldn't make any sense to have the the default (or even option) of creating cygwin symlinks as winsymlinks. oops. add ...on XP and possibly derivatives thereof. JeffH -- 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/
Re: odd behavior of symlinks on Win XP SP2
On Jan 15 08:17, [EMAIL PROTECTED] wrote: Seems to me we ought to see if we can't update the symlink() impl such that this is addressed. I'm betting there's some new attributes or whatever (as Igor notes) that've been added to symlinks in XP and if we can figure out what that is, and figure out what the minimum is we need to change in our cygwin-created .lnk files, we can perhaps (likely?) fix this without adversely affecting performance. Maybe there's some new system call on XP that we can use to create these buggers (if we're lucky)? After all, AFAIK, all cygwin cares about is the cygwin path being in the .lnk file's comment attribute/field, yes? I'm glad that you're talking about us as a group. Anybody interested in tracking that down? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- 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/
Re: odd behavior of symlinks on Win XP SP2
On Jan 14 20:05, Igor Pechtchanski wrote: On Fri, 14 Jan 2005, Jeff.Hodges wrote: Mostly these are symlinks to directories which I use to more conveniently traipse around my filesystem. This was true of all my cygwin install/upgrades on Win2k from say 1999 thru 2004. The native Win filesystem has been NTFS in all cases, fwiw. 2001. The shortcuts have been added to Cygwin in 2001. 1. cygwin-created (via ln -s) symlinks/shortcuts pointing to a directory are displayed in windows file dialogs with the windows default funky file icon (I dunno what it's actual name is) rather than the windows folder icon as used to be the case on win2k/cygwin. 2. cygwin-created (via ln -s) symlinks/shortcuts pointing to a directory are displayed in some windows file-open or file-save dialogs, but not in others. On win2k/cygwin, they were always displayed and always behaved exactly like windows-created shortcuts pointing to a directory. In terms of how they are behaving on WinXP/cygwin.. 2.1. In the cases where they *are* displayed in windows file-open or file-save dialogs, e.g. using windows version of OpenOffice 1.1.3, the program in question attempts to either open the symlink/shortcut file itself or overwrite it, respectively. 2.2. In the cases where they are not* displayed in the windows dialog (whether open or save), e.g. as done by Firefox 1.0 in the file-save case, well, the symlink/shortcut simply isn't listed in the dialog, when on win2k/cygwin they were displayed (and behaved) just fine. Hmm, interesting. I've never noticed this, but your mail prompted me to look on my own machine. And, lo and behold, on a plain WinXP SP1 (note, no SP2) I get the same behavior. But they work in Windows Explorer, nevertheless. We're not in control of the icon used by Windows. As soon as we do, the shortcut is not a Cygwin shortcut anymore and it's saved by tar as a file rather than a symlink. I've noticed this. Further, after a quick look at the structure of the symlinks[*] shows that the shortcuts created by WinXP have much more stuff in them (513 bytes vs. 115 bytes), and they seem to have most of the stuff (comments and paths) in Unicode. I suspect that WinXP doesn't really deal well with non-Unicode shortcuts. Perhaps an update to Cygwin's symlink() implementation is in order? The one that's there now actually has the structure of a Windows symlink hard-coded in (which apparently fails on XP). See path.cc in src/winsup/cygwin. http://cygwin.com/acronyms/#PTC. It has been done so for speed. And it doesn't really fail. The shortcut is still a shortcut in Windows Explorer. I'm wondering if it's really the Unicodeness of the shortcut which makes the difference. Usually shortcuts generated in Windows Explorer are much longer anyway. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- 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/
Re: odd behavior of symlinks on Win XP SP2
Thanks for looking at this Igor. Glad to know it isn't just me. [EMAIL PROTECTED] said: And, lo and behold, on a plain WinXP SP1 (note, no SP2) I get the same behavior. aha. innaresting. Well, I installed vanilla XP and then copied over a buncha directories from my old Win2k box, including \cygwin, and didn't play with it much before I upgraded to SP2. So I didn't really note anything while it was pre-SP2. Perhaps an update to Cygwin's symlink() implementation is in order? that's what I'm thinking. [EMAIL PROTECTED] said: 2001. The shortcuts have been added to Cygwin in 2001. ah, ok. I guess I didn't really start playing/using Cygwin in somewhat ernest until around then anyway. [EMAIL PROTECTED] said: And it doesn't really fail. The shortcut is still a shortcut in Windows Explorer. Well, I claim that it *does* really fail because they (cygwin-created shortcut/symlinks) no longer -- on XP as compared to Win2k -- behave as they did. One uses file open/save dialogs very often when using windoze and on XP the cygwin-created shortcut/symlinks no longer behave as-documented (or as-in-an-explorer-window). So they don't fail in all use cases, rather they fail in some often-exercised use cases. Seems to me we ought to see if we can't update the symlink() impl such that this is addressed. I'm betting there's some new attributes or whatever (as Igor notes) that've been added to symlinks in XP and if we can figure out what that is, and figure out what the minimum is we need to change in our cygwin-created .lnk files, we can perhaps (likely?) fix this without adversely affecting performance. Maybe there's some new system call on XP that we can use to create these buggers (if we're lucky)? After all, AFAIK, all cygwin cares about is the cygwin path being in the .lnk file's comment attribute/field, yes? thanks again for looking into this, JeffH -- 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/
Re: odd behavior of symlinks on Win XP SP2
On Fri, 14 Jan 2005, Jeff.Hodges wrote: I've searched this list and googled and all, and can't find anything about this issue, so perhaps it's some cockpit error on my part. Anyways, here's the issue/question... cygwin symlinks (aka cygwin-created windows shortcuts) seem to work differently, and incorrectly, from the windows perspective, on Win XP SP2 than they did on (say) Win 2000 Pro. On Win2k, I got into the habit of creating many of my symlinks/shortcuts via Cygwin (ln -s of course) because then they were available, and worked correctly, from both the Cygwin and windows perspectives. Mostly these are symlinks to directories which I use to more conveniently traipse around my filesystem. This was true of all my cygwin install/upgrades on Win2k from say 1999 thru 2004. The native Win filesystem has been NTFS in all cases, fwiw. However, now on Win XP SP2 (professional) -- I moved to XP SP2 from Win2k in Nov-2004 -- I notice the following behavior with both existing symlinks/shortcuts copied over to XP from my Win2k box and with new symlinks I've created with my newly-upgraded (27-Dec-2004) cygwin install (on XP)... 1. cygwin-created (via ln -s) symlinks/shortcuts pointing to a directory are displayed in windows file dialogs with the windows default funky file icon (I dunno what it's actual name is) rather than the windows folder icon as used to be the case on win2k/cygwin. 2. cygwin-created (via ln -s) symlinks/shortcuts pointing to a directory are displayed in some windows file-open or file-save dialogs, but not in others. On win2k/cygwin, they were always displayed and always behaved exactly like windows-created shortcuts pointing to a directory. In terms of how they are behaving on WinXP/cygwin.. 2.1. In the cases where they *are* displayed in windows file-open or file-save dialogs, e.g. using windows version of OpenOffice 1.1.3, the program in question attempts to either open the symlink/shortcut file itself or overwrite it, respectively. 2.2. In the cases where they are not* displayed in the windows dialog (whether open or save), e.g. as done by Firefox 1.0 in the file-save case, well, the symlink/shortcut simply isn't listed in the dialog, when on win2k/cygwin they were displayed (and behaved) just fine. Hmm, interesting. I've never noticed this, but your mail prompted me to look on my own machine. And, lo and behold, on a plain WinXP SP1 (note, no SP2) I get the same behavior. I suspect either there's some cockpit error I've committed (or am committing) either or both on the Win XP side or the Cygwin side, OR, there's something different with Win XP SP2 wrt shortcuts that's causing this. I'd say the latter (except it applies to WinXP in general, not just SP2). I do have a symlink or two that I'd created on win2k/cygwin that I copied over to the WinXP/cygwin machine (as a part of a copied-over filesystem subtree) that behaves (on XP) as it did on win2k. Yet there are other symlinks/shortcuts in the same filesystem subtree that now work incorrectly. Has anyone else noticed this behavior? If so do you have any ideas on how to get it rectified? I've noticed this. Further, after a quick look at the structure of the symlinks[*] shows that the shortcuts created by WinXP have much more stuff in them (513 bytes vs. 115 bytes), and they seem to have most of the stuff (comments and paths) in Unicode. I suspect that WinXP doesn't really deal well with non-Unicode shortcuts. Perhaps an update to Cygwin's symlink() implementation is in order? The one that's there now actually has the structure of a Windows symlink hard-coded in (which apparently fails on XP). See path.cc in src/winsup/cygwin. http://cygwin.com/acronyms/#PTC. HTH, Igor [*] BTW, if you have a symlink named foo, run attrib -R foo.lnk to be able to view (and maybe even edit, if you know what you're doing) the contents in vi, and then attrib +R foo.lnk to turn it back to a symlink. -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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/