--- BasiliskII/src/Unix/extfs_unix.cpp 1999/10/27 16:59:45 1.5 +++ BasiliskII/src/Unix/extfs_unix.cpp 1999/11/08 16:43:11 1.7 @@ -85,6 +85,7 @@ struct finf_struct { uint32 type; uint32 creator; uint16 flags; + uint16 pad0; }; static void make_helper_path(const char *src, char *dest, const char *add, bool only_dir = false) @@ -114,7 +115,7 @@ static int create_helper_dir(const char { char helper_dir[MAX_PATH_LENGTH]; make_helper_path(path, helper_dir, add, true); - return mkdir(helper_dir, 0755); + return mkdir(helper_dir, 0777); } static int open_helper(const char *path, const char *add, int flag) @@ -122,9 +123,9 @@ static int open_helper(const char *path, char helper_path[MAX_PATH_LENGTH]; make_helper_path(path, helper_path, add); - if ((flag & O_RDWR) || (flag && O_WRONLY)) + if ((flag & O_ACCMODE) == O_RDWR || (flag & O_ACCMODE) == O_WRONLY) flag |= O_CREAT; - int fd = open(helper_path, flag, 0644); + int fd = open(helper_path, flag, 0666); if (fd < 0) { if (errno == ENOENT && (flag & O_CREAT)) { // One path component was missing, probably the helper @@ -132,7 +133,7 @@ static int open_helper(const char *path, int ret = create_helper_dir(path, add); if (ret < 0) return ret; - fd = open(helper_path, flag, 0644); + fd = open(helper_path, flag, 0666); } } return fd; @@ -258,7 +259,7 @@ void set_finder_type(const char *path, u return; // Read file - finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS}; + finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS, 0}; read(fd, &finf, sizeof(finf_struct)); // Set Finder flags @@ -302,7 +303,7 @@ void set_finder_flags(const char *path, return; // Read file - finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS}; + finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS, 0}; read(fd, &finf, sizeof(finf_struct)); // Set Finder flags