1 |
|
/* |
2 |
|
* extfs_amiga.cpp - MacOS file system for access native file system access, AmigaOS specific stuff |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2000 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2001 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
156 |
|
{".z", FOURCC('Z','I','V','M'), FOURCC('L','Z','I','V')}, |
157 |
|
{".gz", FOURCC('G','z','i','p'), FOURCC('G','z','i','p')}, |
158 |
|
{".hqx", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')}, |
159 |
+ |
{".bin", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')}, |
160 |
|
{".pdf", FOURCC('P','D','F',' '), FOURCC('C','A','R','O')}, |
161 |
|
{".ps", FOURCC('T','E','X','T'), FOURCC('t','t','x','t')}, |
162 |
|
{".sit", FOURCC('S','I','T','!'), FOURCC('S','I','T','x')}, |
211 |
|
{NULL, 0, 0} // End marker |
212 |
|
}; |
213 |
|
|
214 |
< |
void get_finfo(const char *path, uint32 finfo, uint32 fxinfo) |
214 |
> |
void get_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir) |
215 |
|
{ |
216 |
|
// Set default finder info |
217 |
|
Mac_memset(finfo, 0, SIZEOF_FInfo); |
232 |
|
} |
233 |
|
|
234 |
|
// No Finder info file, translate file name extension to MacOS type/creator |
235 |
< |
struct stat st; |
235 |
< |
if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) { |
235 |
> |
if (!is_dir) { |
236 |
|
int path_len = strlen(path); |
237 |
|
for (int i=0; e2t_translation[i].ext; i++) { |
238 |
|
int ext_len = strlen(e2t_translation[i].ext); |
247 |
|
} |
248 |
|
} |
249 |
|
|
250 |
< |
void set_finfo(const char *path, uint32 finfo, uint32 fxinfo) |
250 |
> |
void set_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir) |
251 |
|
{ |
252 |
|
// Open Finder info file |
253 |
|
int fd = open_finf(path, O_RDWR); |