Changeset 5333

Show
Ignore:
Timestamp:
03/01/08 07:29:14 (5 months ago)
Author:
morris
Message:

Read and write Finder comments

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wired/trunk/wired/files.c

    r5329 r5333  
    10191019 
    10201020                /* track unique inodes */ 
    1021                 number = wi_number_with_value(WI_NUMBER_INO_T, &sb.ino); 
     1021                number = wi_number_with_value(WI_NUMBER_INT64, &sb.ino); 
    10221022                 
    10231023                if(!wi_set_contains_data(wd_files_index_set, number)) { 
     
    11491149wi_string_t * wd_files_comment(wi_string_t *path) { 
    11501150        wi_file_t               *file; 
     1151#ifdef HAVE_CORESERVICES_CORESERVICES_H 
     1152        wi_string_t             *realpath, *comment; 
     1153#endif 
    11511154        wi_string_t             *name, *dirpath, *realdirpath, *commentpath; 
    11521155        wi_string_t             *eachname, *eachcomment; 
     1156 
     1157#ifdef HAVE_CORESERVICES_CORESERVICES_H 
     1158        realpath        = wi_string_by_resolving_aliases_in_path(wd_files_real_path(path)); 
     1159        comment         = wi_file_finder_comment(realpath); 
     1160         
     1161        if(comment) 
     1162                return comment; 
     1163#endif 
    11531164         
    11541165        name            = wi_string_last_path_component(path); 
     
    11761187void wd_files_set_comment(wi_string_t *path, wi_string_t *comment) { 
    11771188        wi_file_t               *file, *tmpfile; 
     1189#ifdef HAVE_CORESERVICES_CORESERVICES_H 
     1190        wi_string_t             *realpath; 
     1191#endif 
    11781192        wi_string_t             *name, *dirpath, *realdirpath, *metapath, *commentpath; 
    11791193        wi_string_t             *string, *eachname, *eachcomment; 
     
    12501264                } 
    12511265        } 
     1266 
     1267#ifdef HAVE_CORESERVICES_CORESERVICES_H 
     1268        realpath = wi_string_by_resolving_aliases_in_path(wd_files_real_path(path)); 
     1269 
     1270        if(!wi_file_set_finder_comment(realpath, comment)) 
     1271                wi_log_info(WI_STR("Could not set Finder comment: %m")); 
     1272#endif 
    12521273} 
    12531274