From 3b72264d30f579d16607bca11d763377eb82cc54 Mon Sep 17 00:00:00 2001 From: ksherlock Date: Sat, 17 Jan 2009 20:49:32 +0000 Subject: [PATCH] git-svn-id: https://profuse.googlecode.com/svn/trunk@18 aa027e90-d47c-11dd-86d7-074df07e0730 --- DiskCopy42.cpp | 3 ++- main.cpp | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DiskCopy42.cpp b/DiskCopy42.cpp index 50115ae..56d4d0d 100644 --- a/DiskCopy42.cpp +++ b/DiskCopy42.cpp @@ -36,4 +36,5 @@ bool DiskCopy42::Load(const uint8_t *buffer) if (private_word != 0x100) return false; return true; -} \ No newline at end of file +} + diff --git a/main.cpp b/main.cpp index 568199b..4a55478 100644 --- a/main.cpp +++ b/main.cpp @@ -122,8 +122,11 @@ static void xattr_textencoding(FileEntry& e, fuse_req_t req, size_t size, off_t const char attr[] = "MACINTOSH;0"; unsigned attr_size = sizeof(attr) - 1; - // currently only valid for Teach Files. - if (e.file_type != 0x50 || e.aux_type != 0x5445) + // currently only valid for Teach Files, "ASCII" Text + + if (e.file_type == 0x04 || (e.file_type == 0x50 && e.aux_type == 0x5445)) + /* do nothing */ ; + else { ERROR(true, ENOENT) } @@ -304,7 +307,9 @@ static void prodos_listxattr(fuse_req_t req, fuse_ino_t ino, size_t size) break; } - if (e.file_type == 0x50 && e.aux_type == 0x5445) // teach text + if ( + e.file_type == 0x04 + || (e.file_type == 0x50 && e.aux_type == 0x5445)) // teach text { attr += "com.apple.TextEncoding"; attr.append(1, 0); @@ -975,7 +980,9 @@ int main(int argc, char *argv[]) // use 512byte blocks. + #if __APPLE__ fuse_opt_add_arg(&args, "-oiosize=512"); + #endif do {