Re: rm.c functions in mv(1)

2016-10-10 Thread Ted Unangst
Jan Stary wrote: > bin/mv has its own copies of cp.c and mv.c. > Apparently, they are modifications of cp's cp.c and rm's rm.c, > used when moving as "copy and remove the source". > > In bin/mv/rm.c, the following snippet of rm_file() confuses me: > > if (S_ISDIR(sb.st_mode)) { >

Re: rm.c functions in mv(1)

2016-10-10 Thread Jan Stary
On Oct 10 12:25:39, h...@stare.cz wrote: > bin/mv has its own copies of cp.c and mv.c. > Apparently, they are modifications of cp's cp.c and rm's rm.c, > used when moving as "copy and remove the source". > > In bin/mv/rm.c, the following snippet of rm_file() confuses me: > > if (S_ISDIR(sb.

rm.c functions in mv(1)

2016-10-10 Thread Jan Stary
bin/mv has its own copies of cp.c and mv.c. Apparently, they are modifications of cp's cp.c and rm's rm.c, used when moving as "copy and remove the source". In bin/mv/rm.c, the following snippet of rm_file() confuses me: if (S_ISDIR(sb.st_mode)) { warnx("%s: is a directory