Changeset 4412

Show
Ignore:
Timestamp:
11/09/06 16:13:43 (2 years ago)
Author:
morris
Message:

Fix problem with downloading files with relative paths


Add -P when saving bookmark with non-default port

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/wire/chats.h

    r4399 r4412  
    5252 
    5353wr_cid_t                                                        wr_chat_id(wr_chat_t *); 
    54 wi_array_t *                                                   wr_chat_users(wr_chat_t *); 
     54wi_array_t *                                            wr_chat_users(wr_chat_t *); 
    5555 
    5656void                                                            wr_chat_add_user(wr_chat_t *, wr_user_t *); 
  • wire/trunk/wire/commands.c

    r4399 r4412  
    711711        wi_string_t             *path; 
    712712         
    713         enumerator = wi_array_data_enumerator(arguments); 
     713        enumerator = wi_array_data_enumerator(wr_files_full_paths(arguments)); 
    714714         
    715715        while((path = wi_enumerator_next_data(enumerator))) 
     
    14341434static void wr_cmd_save(wi_array_t *arguments) { 
    14351435        wi_file_t               *file; 
    1436         wi_string_t             *path
     1436        wi_string_t             *path, *login, *password, *port
    14371437 
    14381438        path = wi_user_home(); 
     
    14591459         
    14601460        if(wr_connected) { 
    1461                 if(wi_string_length(wr_login) > 0 && wi_string_length(wr_password) > 0) 
    1462                         wi_file_write(file, WI_STR("open %@ -l %@ -p %@\n"), wr_host, wr_login, wr_password); 
    1463                 else if(wi_string_length(wr_login) > 0) 
    1464                         wi_file_write(file, WI_STR("open %@ -l %@\n"), wr_host, wr_login); 
     1461                if(wi_string_length(wr_login) > 0) 
     1462                        login = wi_string_with_format(WI_STR("-l %@"), wr_login); 
    14651463                else 
    1466                         wi_file_write(file, WI_STR("open %@\n"), wr_host); 
     1464                        login = NULL; 
     1465                 
     1466                if(wi_string_length(wr_password) > 0) 
     1467                        password = wi_string_with_format(WI_STR("-p %@"), wr_password); 
     1468                else 
     1469                        password = NULL; 
     1470                 
     1471                if(wr_port != WR_CONTROL_PORT) 
     1472                        port = wi_string_with_format(WI_STR("-P %u"), wr_port); 
     1473                else 
     1474                        port = NULL; 
     1475                 
     1476                wi_file_write(file, WI_STR("open %@ %#@ %#@ %#@\n"), wr_host, login, password, port); 
    14671477        } 
    14681478