bug triggered by long file names in cygwin 1.7.0-52

Dan Stratila dstrat@rci.rutgers.edu
Sun Jul 26 10:35:00 GMT 2009


Hello,

I just installed Cygwin 1.7.0-52, and now rdiff-backup is able to work with
path names longer than 260 characters when backing up. Very nice.

However, when I open a standard bash prompt and attempt to cd into such a
directory, it crashes:

---
dstrat@thelaptop /cygdrive/d/work/scratch
$ cd lfn_test/

dstrat@thelaptop /cygdrive/d/work/scratch/lfn_test
$ cd
LFN_123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890
1234567890/

dstrat@thelaptop
/cygdrive/d/work/scratch/lfn_test/LFN_12345678901234567890123456789012345678
901
23456789012345678901234567890123456789012345678901234567890
$ cd
LFN_123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890
1234567890/

dstrat@thelaptop
/cygdrive/d/work/scratch/lfn_test/LFN_12345678901234567890123456789012345678
901
23456789012345678901234567890123456789012345678901234567890/LFN_123456789012
345678901234567890123456
7890123456789012345678901234567890123456789012345678901234567890
$ cd
LFN_123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890
1234567890/

(Console window disappears switftly and without any error messages)
---

After thinking about this for a bit, I realized that the problem is related
to the fact that bash sets the window title to the current path. When I
change PS1 to only place the basename of the current path in the window
title, the crash no longer happens:

---
dstrat@thelaptop /cygdrive/d/work/scratch
$ PS1='\[\e]0;\W\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '

dstrat@thelaptop /cygdrive/d/work/scratch
$ cd lfn_test/

dstrat@thelaptop /cygdrive/d/work/scratch/lfn_test
$ cd
LFN_123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890
1234567890/

dstrat@thelaptop
/cygdrive/d/work/scratch/lfn_test/LFN_12345678901234567890123456789012345678
901
23456789012345678901234567890123456789012345678901234567890
$ cd
LFN_123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890
1234567890/

dstrat@thelaptop
/cygdrive/d/work/scratch/lfn_test/LFN_12345678901234567890123456789012345678
901
23456789012345678901234567890123456789012345678901234567890/LFN_123456789012
345678901234567890123456
7890123456789012345678901234567890123456789012345678901234567890
$ cd
LFN_123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890
1234567890/

dstrat@thelaptop
/cygdrive/d/work/scratch/lfn_test/LFN_12345678901234567890123456789012345678
901
23456789012345678901234567890123456789012345678901234567890/LFN_123456789012
345678901234567890123456
7890123456789012345678901234567890123456789012345678901234567890/LFN_1234567
890123456789012345678901
234567890123456789012345678901234567890123456789012345678901234567890
$ pwd
/cygdrive/d/work/scratch/lfn_test/LFN_12345678901234567890123456789012345678
901234567890123456789
01234567890123456789012345678901234567890/LFN_123456789012345678901234567890
123456789012345678901234
5678901234567890123456789012345678901234567890/LFN_1234567890123456789012345
678901234567890123456789
012345678901234567890123456789012345678901234567890
---

So my guess is that somewhere in the code that sets the window title, either
on the Cygwin side or the Windows side, there is a limitation on the length
of the title.

Sincerely,
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 72448 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090726/5068da7d/attachment.obj>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list