plan9fox/sys
cinap_lenrek 6118d77858 ape: reimplement rename() - fixing compiler warnings and handling more error cases
handle empty filename, dot and dotdot. handle mismatching from/to directory/file
type. cleanup destination file on error. error when attempting to copy non-empty
directories.

little test program:

#include <unistd.h>
#include <stdio.h>

int
main(int argc, char *argv[])
{
	if(argc != 3){
		fprintf(stderr, "usage: %s old new\n", argv[0]);
		return 1;
	}
	if(rename(argv[1], argv[2])){
		perror("rename");
		return 1;
	}
	return 0;
}
2019-06-24 20:09:04 +02:00
..
doc
games/lib fortunes: Open source may not be safe if it has no super excellent moderator. 2019-03-17 23:13:27 -04:00
include stdio: fix putc(), plan9 version 2019-06-20 00:04:58 +02:00
lib gs: apply fixes for CVE-2018-16509 (thanks jsmoody) 2019-05-23 14:59:28 +02:00
man Always turn on the -+ flag in cpp 2019-06-18 22:47:15 -07:00
src ape: reimplement rename() - fixing compiler warnings and handling more error cases 2019-06-24 20:09:04 +02:00