--- BasiliskII/src/BeOS/extfs_beos.cpp 1999/10/27 17:20:46 1.5 +++ BasiliskII/src/BeOS/extfs_beos.cpp 1999/11/08 17:00:12 1.7 @@ -283,7 +283,7 @@ int open_rfork(const char *path, int fla // Open temporary file for resource fork char rname[L_tmpnam]; tmpnam(rname); - int rfd = open(rname, O_RDWR | O_CREAT | O_TRUNC, 0664); + int rfd = open(rname, O_RDWR | O_CREAT | O_TRUNC, 0666); if (rfd < 0) { close(fd); return -1; @@ -455,3 +455,19 @@ size_t extfs_write(int fd, void *buffer, } return actual; } + + +/* + * Remove file/directory, returns false on error (and sets errno) + */ + +bool extfs_remove(const char *path) +{ + if (remove(path) < 0) { + if (errno == EISDIR) + return rmdir(path) == 0; + else + return false; + } + return true; +}