Ignore:
Timestamp:
Mar 12, 2008, 9:08:18 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.28a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/client/client.c

    r105 r124  
    280280        } else {
    281281                pstrcat(cur_dir,p);
    282                 if ((cur_dir[0] != '\0') && (*(cur_dir+strlen(cur_dir)-1) != CLI_DIRSEP_CHAR)) {
    283                         pstrcat(cur_dir, CLI_DIRSEP_STR);
    284                 }
     282        }
     283
     284        /* Ensure cur_dir ends in a DIRSEP */
     285        if ((cur_dir[0] != '\0') && (*(cur_dir+strlen(cur_dir)-1) != CLI_DIRSEP_CHAR)) {
     286                pstrcat(cur_dir, CLI_DIRSEP_STR);
    285287        }
    286288       
     
    700702       
    701703        dir_total = 0;
    702         if (strcmp(cur_dir, CLI_DIRSEP_STR) != 0) {
    703                 pstrcpy(mask,cur_dir);
    704                 if ((mask[0] != '\0') && (mask[strlen(mask)-1]!=CLI_DIRSEP_CHAR))
    705                         pstrcat(mask,CLI_DIRSEP_STR);
    706         } else {
    707                 pstrcpy(mask, CLI_DIRSEP_STR);
    708         }
     704        pstrcpy(mask,cur_dir);
    709705       
    710706        if (next_token_nr(NULL,buf,NULL,sizeof(buf))) {
    711707                dos_format(p);
    712708                if (*p == CLI_DIRSEP_CHAR)
    713                         pstrcpy(mask,p + 1);
     709                        pstrcpy(mask,p);
    714710                else
    715711                        pstrcat(mask,p);
     
    746742        dir_total = 0;
    747743        pstrcpy(mask,cur_dir);
    748         if ((mask[0] != '\0') && (mask[strlen(mask)-1]!=CLI_DIRSEP_CHAR))
    749                 pstrcat(mask,CLI_DIRSEP_STR);
    750        
     744
    751745        if (next_token_nr(NULL,buf,NULL,sizeof(buf))) {
    752746                dos_format(p);
     
    913907
    914908        pstrcpy(rname,cur_dir);
    915         pstrcat(rname,CLI_DIRSEP_STR);
    916909       
    917910        p = rname + strlen(rname);
     
    10081001
    10091002        pstrcpy(rname,cur_dir);
    1010         pstrcat(rname,CLI_DIRSEP_STR);
    10111003       
    10121004        slprintf(lname,sizeof(lname)-1, "%s/smbmore.XXXXXX",tmpdir());
     
    10571049        while (next_token_nr(NULL,p,NULL,sizeof(buf))) {
    10581050                pstrcpy(mget_mask,cur_dir);
    1059                 if ((mget_mask[0] != '\0') && (mget_mask[strlen(mget_mask)-1]!=CLI_DIRSEP_CHAR))
    1060                         pstrcat(mget_mask,CLI_DIRSEP_STR);
    10611051               
    10621052                if (*p == CLI_DIRSEP_CHAR)
     
    10691059        if (!*mget_mask) {
    10701060                pstrcpy(mget_mask,cur_dir);
    1071                 if(mget_mask[strlen(mget_mask)-1]!=CLI_DIRSEP_CHAR)
    1072                         pstrcat(mget_mask,CLI_DIRSEP_STR);
    10731061                pstrcat(mget_mask,"*");
    10741062                do_list(mget_mask, attribute,do_mget,False,True);
     
    13491337       
    13501338        pstrcpy(rname,cur_dir);
    1351         pstrcat(rname,CLI_DIRSEP_STR);
    13521339 
    13531340        if (!next_token_nr(NULL,p,NULL,sizeof(buf))) {
     
    19981985                *CLI_DIRSEP_STR = '/';
    19991986                pstrcpy(cur_dir, CLI_DIRSEP_STR);
     1987                do_cd(cur_dir);
    20001988        }
    20011989
     
    29032891
    29042892        pstrcpy(remote_name, cur_dir);
    2905         pstrcat(remote_name, CLI_DIRSEP_STR);
    29062893       
    29072894        p = remote_name + strlen(remote_name);
     
    29322919       
    29332920        pstrcpy(remote_name, cur_dir);
    2934         pstrcat(remote_name, CLI_DIRSEP_STR);
    29352921 
    29362922        if (!next_token_nr(NULL, p, NULL, sizeof(buf))) {
     
    38583844{
    38593845        pstring base_directory;
     3846        int len = 0;
    38603847        int opt;
    38613848        pstring query_host;
     
    39083895        set_global_myname( "" );
    39093896
    3910         /* set default debug level to 0 regardless of what smb.conf sets */
     3897        /* set default debug level to 1 regardless of what smb.conf sets */
    39113898        setup_logging( "smbclient", True );
    39123899        DEBUGLEVEL_CLASS[DBGC_ALL] = 1;
     
    40694056                        exit(1);
    40704057                }
     4058                /* Remove trailing slashes */
     4059                len = strlen(service);
     4060                while(len > 0 && service[len - 1] == '\\') {
     4061                        --len;
     4062                        service[len] = '\0';
     4063                }
    40714064        }
    40724065       
Note: See TracChangeset for help on using the changeset viewer.