]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/adouble/ad_read.c
Symlink patch from Anton Starikov
[netatalk.git] / libatalk / adouble / ad_read.c
index 19d6218f3e6ff28c0ef95c4423ce39b99e35491d..58c38def7eb9670b45de40f066902a2c13e03b52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_read.c,v 1.9 2009-10-13 22:55:37 didg Exp $
+ * $Id: ad_read.c,v 1.9.2.1 2010-01-02 10:22:33 franklahm Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -66,7 +66,13 @@ ssize_t ad_read( struct adouble *ad, const u_int32_t eid, off_t off, char *buf,
     /* We're either reading the data fork (and thus the data file)
      * or we're reading anything else (and thus the header file). */
     if ( eid == ADEID_DFORK ) {
+        if (ad->ad_data_fork.adf_syml !=0) {
+            cc=strlen(ad->ad_data_fork.adf_syml);
+            if (buflen >=cc) memcpy(buf,ad->ad_data_fork.adf_syml,cc);
+            else cc=0;
+        }else{
         cc = adf_pread(&ad->ad_data_fork, buf, buflen, off);
+        }
     } else {
         off_t r_off;