Changeset 3677

Show
Ignore:
Timestamp:
02/07/06 11:49:43 (3 years ago)
Author:
morris
Message:

Warn when search method = index, but no index key is set, also prevent a crash

Files:

Legend:

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

    r3575 r3677  
    552552void wd_files_search(wi_string_t *query) { 
    553553        wi_string_t             *realpath; 
    554          
    555         if(wi_is_equal(wd_settings.searchmethod, WI_STR("index"))) { 
     554 
     555        if(wi_is_equal(wd_settings.searchmethod, WI_STR("index")) && wd_settings.index) { 
    556556                wd_files_search_index(query); 
    557557        } else { 
  • wired/trunk/wired/settings.c

    r3551 r3677  
    108108        wi_release(description); 
    109109        wi_release(banner); 
     110 
     111    if(wi_is_equal(wd_settings.searchmethod, WI_STR("index")) && !wd_settings.index) { 
     112                wi_log_warn(WI_STR("Search method is \"index\" but \"index\" setting is missing, search method will revert to live")); 
     113        } 
    110114         
    111115        return result;