]> arthur.barton.de Git - netatalk.git/commitdiff
twisted u_name and m_name
authorHAT <hat@fa2.so-net.ne.jp>
Thu, 29 Aug 2013 11:40:27 +0000 (20:40 +0900)
committerHAT <hat@fa2.so-net.ne.jp>
Thu, 29 Aug 2013 11:40:27 +0000 (20:40 +0900)
Fix Bug#523.

Additional Info:
The following line in ofork.c may also be wrong.

    /* Somone has used write_fork, we assume file was changed, register it to file change event api */
    if (ofork->of_flags & AFPFORK_MODIFIED) {
        struct dir *dir =  dirlookup(ofork->of_vol, ofork->of_did);
        bstring forkpath = bformat("%s/%s", bdata(dir->d_fullpath), of_name(ofork));
        fce_register(FCE_FILE_MODIFY, bdata(forkpath), NULL, fce_file);
        bdestroy(forkpath);
    }

NEWS
etc/afpd/fork.c
include/atalk/adouble.h

diff --git a/NEWS b/NEWS
index 98e2d2b5d969a81152012627bd00c48b2110f7aa..3da771f963db530d408b127f39c44e33cd78bb7d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Changes in 3.0.6
+================
+* FIX: charset conversion failed when copying from Mac OS 9. Bug #523.
+
 Changes in 3.0.5
 ================
 * FIX: Fix a crash when using pam_winbind. Fixes bug #516.
index 0c988828d609660bc096c8cf01c944f6f8e633dc..350b57113a4eb72f9e43367a16074a74bd21e251 100644 (file)
@@ -66,10 +66,10 @@ static int getforkparams(const AFPObj *obj, struct ofork *ofork, uint16_t bitmap
     vol = ofork->of_vol;
     dir = dirlookup(vol, ofork->of_did);
 
-    if (NULL == (path.m_name = utompath(vol, of_name(ofork), dir->d_did, utf8_encoding(obj)))) {
+    if (NULL == (path.u_name = mtoupath(vol, of_name(ofork), dir->d_did, utf8_encoding(obj)))) {
         return( AFPERR_MISC );
     }
-    path.u_name = of_name(ofork);
+    path.m_name = of_name(ofork);
     path.id = 0;
     st = &path.st;
     if ( bitmap & ( (1<<FILPBIT_DFLEN) | (1<<FILPBIT_EXTDFLEN) |
index 3b764a7689e42299e9d2b8f008dbfa78bd378ace..0a66ad2683517602f8b6349064e91104f28b22ae 100644 (file)
@@ -219,7 +219,7 @@ struct adouble {
     int                 ad_reso_refcount;
     off_t               ad_rlen;           /* ressource fork len with AFP 3.0         *
                                             * the header parameter size is too small. */
-    char                *ad_name;          /* name (UTF8-MAC)                         */
+    char                *ad_name;          /* mac name (maccharset or UTF8-MAC)       */
     struct adouble_fops *ad_ops;
     uint16_t            ad_open_forks;     /* open forks (by others)                  */
     char                ad_data[AD_DATASZ_MAX];