summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/plan9/execve.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-06-24 20:09:04 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-06-24 20:09:04 +0200
commit6118d778581b44e5c41a04a60d4aa8e6cad4a37c (patch)
tree8e1ddd9d522edcc86a3a3b9759af7fde8ca33567 /sys/src/ape/lib/ap/plan9/execve.c
parent4cffc0436451cb192fb041a4b2be6fa8db5eda8e (diff)
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; }
Diffstat (limited to 'sys/src/ape/lib/ap/plan9/execve.c')
0 files changed, 0 insertions, 0 deletions