DragonFly BSD
DragonFly submit List (threaded) for 2005-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: basename bug [patch attached]


From: Jeroen Ruigrok/asmodai <asmodai@xxxxxxxxxxxxx>
Date: Fri, 23 Sep 2005 09:06:11 +0200

-On [20050922 23:04], Kyle Butt (kylebutt@xxxxxxxxx) wrote:
>I found a bug in basename (discovered via pkgsrc) and I've
>attached a patch to fix it. Hopefully this helps.

>-	suffix = 0;
>-	suffixlen = NULL;
>+	suffix = NULL;
>+	suffixlen = 0;

DUH, I fixed this.  For some reason I had it reversed in the code.

>+	if (argc == 2) {
>+		suffix = argv[1];
>+		suffixlen = strlen(argv[1]);
>+	}

This is already present in the latest CVS sources, so I wonder where it
comes from in yours.

Thing is, FreeBSD added extra flags to basename to cut of a bunch of files
with a suffix and I am not 100% sure we want that functionality or not.

SO, with the latest files from CVS, can you check again?

-- 
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
Free Tibet! http://www.savetibet.org/ | http://www.andf.info/
http://www.tendra.org/   | http://www.in-nomine.org/
Experience keeps a dear school, yet Fools will learn in no other.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]