85 |
|
uint32 type; |
86 |
|
uint32 creator; |
87 |
|
uint16 flags; |
88 |
+ |
uint16 pad0; |
89 |
|
}; |
90 |
|
|
91 |
|
static void make_helper_path(const char *src, char *dest, const char *add, bool only_dir = false) |
115 |
|
{ |
116 |
|
char helper_dir[MAX_PATH_LENGTH]; |
117 |
|
make_helper_path(path, helper_dir, add, true); |
118 |
< |
return mkdir(helper_dir, 0755); |
118 |
> |
return mkdir(helper_dir, 0777); |
119 |
|
} |
120 |
|
|
121 |
|
static int open_helper(const char *path, const char *add, int flag) |
125 |
|
|
126 |
|
if ((flag & O_RDWR) || (flag && O_WRONLY)) |
127 |
|
flag |= O_CREAT; |
128 |
< |
int fd = open(helper_path, flag, 0644); |
128 |
> |
int fd = open(helper_path, flag, 0666); |
129 |
|
if (fd < 0) { |
130 |
|
if (errno == ENOENT && (flag & O_CREAT)) { |
131 |
|
// One path component was missing, probably the helper |
133 |
|
int ret = create_helper_dir(path, add); |
134 |
|
if (ret < 0) |
135 |
|
return ret; |
136 |
< |
fd = open(helper_path, flag, 0644); |
136 |
> |
fd = open(helper_path, flag, 0666); |
137 |
|
} |
138 |
|
} |
139 |
|
return fd; |
259 |
|
return; |
260 |
|
|
261 |
|
// Read file |
262 |
< |
finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS}; |
262 |
> |
finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS, 0}; |
263 |
|
read(fd, &finf, sizeof(finf_struct)); |
264 |
|
|
265 |
|
// Set Finder flags |
303 |
|
return; |
304 |
|
|
305 |
|
// Read file |
306 |
< |
finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS}; |
306 |
> |
finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS, 0}; |
307 |
|
read(fd, &finf, sizeof(finf_struct)); |
308 |
|
|
309 |
|
// Set Finder flags |