summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/plan9/rename.c
AgeCommit message (Collapse)Author
2019-06-24ape: reimplement rename() - fixing compiler warnings and handling more error ↵cinap_lenrek
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-23ape: revert rename() changecinap_lenrek
new implementation gets stuck in a infinite loop. backing this out for now.
2019-06-21Turn on warnings when building libap.Ori Bernstein
For ape, we never enabled warnings in cflags. Turning it on brings up a lot of warnings. Most are noise, but a few caught unused variables and trunctaions of pointers. to smaller integers (int, long). A few warnings remain.
2013-05-06ape: remove unused variablesppatience0
2012-12-03ape: fix _grpmems(), access(), getppid(), cleanupcinap_lenrek
_grpmems() was broken tokenizing group list in place. we have to copy it to status buffer before tokenizing. dynamically alloc path for test file to check write permission on directory and add pid to the name to prevent races. use _OPEN instead of ape open to read /dev/ppid in getppid(). use mode enums instead of numeric constants for _OPEN() and _CREATE().
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen