]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/spotlight.c
Spotlight: file modification date, bug #545
[netatalk.git] / etc / afpd / spotlight.c
index fff5a36ba244def42fed80134ae2664b603cfbd9..a3fa587068b3ed6f699844e050c1793bd336c411 100644 (file)
@@ -390,7 +390,14 @@ static int sl_rpc_storeAttributesForOIDArray(const AFPObj *obj, const DALLOC_CTX
         EC_NEG1_LOG( movecwd(vol, dir) );
     }
 
-    if ((sl_time = dalloc_value_for_key(query, "DALLOC_CTX", 0, "DALLOC_CTX", 1, "DALLOC_CTX", 1, "kMDItemLastUsedDate"))) {
+    /*
+     * We're possibly supposed to update attributes in two places: the
+     * database and the filesystem.  Due to the lack of documentation
+     * and not yet implemented database updates, we cherry pick attributes
+     * that seems to be candidates for updating filesystem metadata.
+     */
+
+    if ((sl_time = dalloc_value_for_key(query, "DALLOC_CTX", 0, "DALLOC_CTX", 1, "DALLOC_CTX", 1, "kMDItemFSContentChangeDate"))) {
         struct utimbuf utimes;
         utimes.actime = utimes.modtime = sl_time->tv_sec;
         utime(path, &utimes);