Changeset 5047

Show
Ignore:
Timestamp:
11/10/07 13:15:53 (8 months ago)
Author:
morris
Message:

Never try to reply to non-existent client when indexing

Files:

Legend:

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

    r5022 r5047  
    5757 
    5858 
    59 static wi_file_offset_t                                         wd_files_count_path(wi_string_t *); 
     59static wi_file_offset_t                                         wd_files_count_path(wi_string_t *, wi_boolean_t); 
    6060 
    6161static void                                                                     wd_files_move_thread(wi_runtime_instance_t *); 
     
    218218                        case WD_FILE_TYPE_DROPBOX: 
    219219                                if(account->view_dropboxes) 
    220                                         size = wd_files_count_path(filepath); 
     220                                        size = wd_files_count_path(filepath, true); 
    221221                                else 
    222222                                        size = 0; 
     
    225225                        case WD_FILE_TYPE_DIR: 
    226226                        case WD_FILE_TYPE_UPLOADS: 
    227                                 size = wd_files_count_path(filepath); 
     227                                size = wd_files_count_path(filepath, true); 
    228228                                break; 
    229229 
     
    279279 
    280280 
    281 static wi_file_offset_t wd_files_count_path(wi_string_t *path) { 
     281static wi_file_offset_t wd_files_count_path(wi_string_t *path, wi_boolean_t interactive) { 
    282282        WI_FTS                                  *fts; 
    283283        WI_FTSENT                               *p; 
     
    291291                wi_log_warn(WI_STR("Could not open %@: %s"), 
    292292                        path, strerror(errno)); 
    293                 wd_reply_error(); 
     293                 
     294                if(interactive) 
     295                        wd_reply_error(); 
    294296 
    295297                return 0; 
     
    360362                case WD_FILE_TYPE_DROPBOX: 
    361363                        if(wd_user_account(user)->view_dropboxes) 
    362                                 size = wd_files_count_path(realpath); 
     364                                size = wd_files_count_path(realpath, true); 
    363365                        else 
    364366                                size = 0; 
     
    367369                case WD_FILE_TYPE_DIR: 
    368370                case WD_FILE_TYPE_UPLOADS: 
    369                         size = wd_files_count_path(realpath); 
     371                        size = wd_files_count_path(realpath, true); 
    370372                        break; 
    371373 
     
    636638                                case WD_FILE_TYPE_DROPBOX: 
    637639                                        if(account->view_dropboxes) 
    638                                                 size = wd_files_count_path(filepath); 
     640                                                size = wd_files_count_path(filepath, true); 
    639641                                        else 
    640642                                                size = 0; 
     
    643645                                case WD_FILE_TYPE_DIR: 
    644646                                case WD_FILE_TYPE_UPLOADS: 
    645                                         size = wd_files_count_path(filepath); 
     647                                        size = wd_files_count_path(filepath, true); 
    646648                                        break; 
    647649                                         
     
    960962                        case WD_FILE_TYPE_DIR: 
    961963                        case WD_FILE_TYPE_UPLOADS: 
    962                                 size = wd_files_count_path(filepath); 
     964                                size = wd_files_count_path(filepath, false); 
    963965                                break; 
    964966