218 |
|
{NULL, 0, 0} // End marker |
219 |
|
}; |
220 |
|
|
221 |
< |
void get_finfo(const char *path, uint32 finfo, uint32 fxinfo) |
221 |
> |
void get_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir) |
222 |
|
{ |
223 |
|
// Set default finder info |
224 |
|
Mac_memset(finfo, 0, SIZEOF_FInfo); |
239 |
|
} |
240 |
|
|
241 |
|
// No Finder info file, translate file name extension to MacOS type/creator |
242 |
< |
struct stat st; |
243 |
< |
if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) { |
242 |
> |
if (!is_dir) { |
243 |
|
int path_len = strlen(path); |
244 |
|
for (int i=0; e2t_translation[i].ext; i++) { |
245 |
|
int ext_len = strlen(e2t_translation[i].ext); |
254 |
|
} |
255 |
|
} |
256 |
|
|
257 |
< |
void set_finfo(const char *path, uint32 finfo, uint32 fxinfo) |
257 |
> |
void set_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir) |
258 |
|
{ |
259 |
|
// Open Finder info file |
260 |
|
int fd = open_finf(path, O_RDWR); |