charset conversion fails when copying from Mac OS 9
When copying the file which has non-ASCII filename from Mac OS 9 to Netatalk
3.0.5, the following errors occur.
I corroborated this problem on Fedora 19, Ubuntu 13.04 and OpenIndiana 151a8.
Aug 15 10:57:17.591788 cnid_dbd[21904] {charcnv.c:1002} (E:Default): Conversion failed ( UTF8 to CH_UCS2 )
Aug 15 10:57:17.591916 cnid_dbd[21904] {pack.c:91} (E:CNID): idxname: conversion error
When this file has Custom Icon, the following errors also occur.
I corroborated this problem on Fedora 19 and Ubuntu 13.04.
Aug 15 10:57:17.592172 cnid_dbd[21904] {dbif.c:896} (E:CNID): error deleting key/value from cnid2.db: DB_SECONDARY_BAD: Secondary index inconsistent with primary
Aug 15 10:57:17.592245 cnid_dbd[21904] {dbd_delete.c:77} (E:CNID): dbd_delete: Unable to delete entry for CNID 1043
Aug 15 10:57:17.592308 cnid_dbd[21904] {dbd_update.c:63} (E:CNID): dbd_update: Unable to update CNID: 1043, dev/ino: 0xfd02/0x22c090f, DID: 1041: K&K ソフトパン粉.eps
When the latter errors occur, if Finder is again opened , file is not
displayed at all.
It seems to be unable to get a resource fork.
It is a problem that cnid_dbd receives legacy mac charset.
It must be vol charset.
Probably, a problem is in afpd, not cnid_dbd.
Fixed in [5622ebede9a01771659d12a67317367fcb001d68].
Related
Commit: <Commit _id='5622ebede9a01771659d12a67317367fcb001d68' tree_id='33be3f93bf6835451bbfc9ff49d276ae3d6425e4' committed=I{'date': datetime.datetime(2013, 8, 29, 11, 40, 27), 'email': 'hat@fa2.so-net.ne.jp', 'name': 'HAT'} authored=I{'date': datetime.datetime(2013, 8, 29, 11, 40, 27), 'email': 'hat@fa2.so-net.ne.jp', 'name': 'HAT'} message='twisted u_name and m_name\n\nFix Bug#523.\n\nAdditional Info:\nThe following line in ofork.c may also be wrong.\n\n /* Somone has used write_fork, we assume file was changed, register it to file change event api */\n if (ofork->of_flags & AFPFORK_MODIFIED) {\n struct dir *dir = dirlookup(ofork->of_vol, ofork->of_did);\n bstring forkpath = bformat("%s/%s", bdata(dir->d_fullpath), of_name(ofork));\n fce_register(FCE_FILE_MODIFY, bdata(forkpath), NULL, fce_file);\n bdestroy(forkpath);\n }\n' parent_ids=I['253061c83e956f269e1f6953940837daafb67d7a'] child_ids=I['e238a56db3e1aadd88387c7979f0c53376445916'] repo_ids=I[ObjectId('503b705bfd48f843173d5fd3'), ObjectId('5910acbc2cd81052b64b3380'), ObjectId('5e503de0dd85f4654ba114ee'), ObjectId('5e828a7a9d8bdd372301c28f')]>