mirror of
https://github.com/ksherlock/dot_clean.git
synced 2024-06-09 06:29:33 +00:00
win32 finder_info_helper.
This commit is contained in:
parent
5e2331fc3e
commit
867ca97246
|
@ -362,6 +362,11 @@ int afp_to_filetype(struct AFP_Info *info, uint16_t *file_type, uint32_t *aux_ty
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum {
|
||||||
|
trust_prodos,
|
||||||
|
trust_hfs
|
||||||
|
};
|
||||||
|
|
||||||
void afp_synchronize(struct AFP_Info *info, int trust) {
|
void afp_synchronize(struct AFP_Info *info, int trust) {
|
||||||
// if ftype/auxtype is inconsistent between prodos and finder info, use
|
// if ftype/auxtype is inconsistent between prodos and finder info, use
|
||||||
// prodos as source of truth.
|
// prodos as source of truth.
|
||||||
|
@ -422,7 +427,7 @@ bool finder_info_helper::read(int fd) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!_afp.prodos_file_type && !_afp.prodos_aux_type)
|
if (!_afp.prodos_file_type && !_afp.prodos_aux_type)
|
||||||
afp_synchronize(&afp, trust_hfs);
|
afp_synchronize(&_afp, trust_hfs);
|
||||||
#else
|
#else
|
||||||
int ok = fi_read(fd, &_finder_info, sizeof(_finder_info));
|
int ok = fi_read(fd, &_finder_info, sizeof(_finder_info));
|
||||||
if (ok < 0) {
|
if (ok < 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user