SCO Unix 386 3.2.0 rename() fails on 14 char file names!

Tom Ivar Helbekkmo tih at barsoom.nhh.no
Wed Jul 4 04:37:22 AEST 1990


Just discovered a bug in the rename() library function under SCO Unix
here...  If either of the file names passed as parameters is 14
characters in length, the call fails with ENAMETOOLONG.  Seems there's
a fence-post error in there...  :-)  To work around it, use

	unlink(target);
	link(source, target);
	unlink(source);

instead of

	rename(source, target);

and you'll be OK.

-tih
-- 
Tom Ivar Helbekkmo, NHH, Bergen, Norway.  Telephone: +47-5-959205
tih at barsoom.nhh.no, thelbekk at norunit.bitnet, edb_tom at debet.nhh.no



More information about the Comp.unix.i386 mailing list