ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/BeOS/extfs_beos.cpp
(Generate patch)

Comparing BasiliskII/src/BeOS/extfs_beos.cpp (file contents):
Revision 1.5 by cebix, 1999-10-27T17:20:46Z vs.
Revision 1.7 by cebix, 1999-11-08T17:00:12Z

# Line 283 | Line 283 | int open_rfork(const char *path, int fla
283          // Open temporary file for resource fork
284          char rname[L_tmpnam];
285          tmpnam(rname);
286 <        int rfd = open(rname, O_RDWR | O_CREAT | O_TRUNC, 0664);
286 >        int rfd = open(rname, O_RDWR | O_CREAT | O_TRUNC, 0666);
287          if (rfd < 0) {
288                  close(fd);
289                  return -1;
# Line 455 | Line 455 | size_t extfs_write(int fd, void *buffer,
455          }
456          return actual;
457   }
458 +
459 +
460 + /*
461 + *  Remove file/directory, returns false on error (and sets errno)
462 + */
463 +
464 + bool extfs_remove(const char *path)
465 + {
466 +        if (remove(path) < 0) {
467 +                if (errno == EISDIR)
468 +                        return rmdir(path) == 0;
469 +                else
470 +                        return false;
471 +        }
472 +        return true;
473 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines