BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003034 [BusyBox] Other minor always 04-22-08 03:15 04-23-08 21:43
Reporter 234d View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0003034: Auto completion of symbolic links to catalogs broken in ash
Description When I try to auto complete a symbolic link to a directory I get a space instead of a slash at the end. This worked fine in 1.9.1 but not in 1.10.1.

# ls -l
drwxr-xr-x 2 root root 0 Apr 22 12:00 bar
lrwxrwxrwx 1 root root 3 Apr 22 12:00 foo -> bar
# ls -l foo<tab>[space]
Additional Information
Attached Files

- Relationships

- Notes
(0007014)
vda
04-23-08 13:39

bash 3.2 behavior:

adds '/' on "real" directories:
sh-3.2# /usr/m68k-uc[TAB] -> /usr/m68k-uclinux/

adds '/' on symlinks to dirs, on SECOND tab:
sh-3.2# /usr/srcd[TAB] -> /usr/srcdevel[TAB] -> /usr/srcdevel/

So that neither old nor current ash behavior matches that.

Anyway. This is how it can be fixed in libbb/lineedit.c:

                        found = concat_path_file(paths[i], str_found);
- /* hmm, remover in progress? */
- if (lstat(found, &st) < 0)
+ /* hmm, remove in progress? */
+ /* NB: stat() first so that we see is it a directory;
+ * but if that fails, use lstat() so that
+ * we still match dangling links */
+ if (stat(found, &st) && lstat(found, &st))
                                goto cont;
 
(0007024)
bernhardf
04-23-08 13:59

vda, sounds fine to me (didn't test it, of course). Please apply.
 
(0007034)
vda
04-23-08 21:43

Fixed in rev 21814.
 

- Issue History
Date Modified Username Field Change
04-22-08 03:15 234d New Issue
04-22-08 03:15 234d Status new => assigned
04-22-08 03:15 234d Assigned To  => BusyBox
04-23-08 13:39 vda Note Added: 0007014
04-23-08 13:59 bernhardf Note Added: 0007024
04-23-08 21:43 vda Status assigned => closed
04-23-08 21:43 vda Note Added: 0007034
04-23-08 21:43 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker