diff options
author | Richard Sharpe <sharpe@samba.org> | 2003-03-03 17:43:33 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 2003-03-03 17:43:33 +0000 |
commit | 3042cfb7fabe25cc06e5cf6c49c2716c1112b6d2 (patch) | |
tree | e2a756cbc0df34804c8a53e608d622b5c1455b72 /source3/client/clitar.c | |
parent | 03a4c1907f93a2efb985ca69180f800be285926d (diff) | |
download | samba-3042cfb7fabe25cc06e5cf6c49c2716c1112b6d2.tar.gz samba-3042cfb7fabe25cc06e5cf6c49c2716c1112b6d2.tar.bz2 samba-3042cfb7fabe25cc06e5cf6c49c2716c1112b6d2.zip |
Do my janitorial duties to encourage others to do so.
Fix lingering large offset problems in smbtar etc.
(This used to be commit c416eec2f2a38eebfcda5868999d474628037f1e)
Diffstat (limited to 'source3/client/clitar.c')
-rw-r--r-- | source3/client/clitar.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index e8be5e04e7..74d901a2ca 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -959,9 +959,10 @@ static int skip_file(int skipsize) static int get_file(file_info2 finfo) { - int fnum = -1, pos = 0, dsize = 0, rsize = 0, bpos = 0; + int fnum = -1, pos = 0, dsize = 0, bpos = 0; + SMB_BIG_UINT rsize = 0; - DEBUG(5, ("get_file: file: %s, size %i\n", finfo.name, (int)finfo.size)); + DEBUG(5, ("get_file: file: %s, size %.0f\n", finfo.name, (double)finfo.size)); if (ensurepath(finfo.name) && (fnum=cli_open(cli, finfo.name, O_RDWR|O_CREAT|O_TRUNC, DENY_NONE)) == -1) { @@ -1052,7 +1053,7 @@ static int get_file(file_info2 finfo) ntarf++; - DEBUG(0, ("restore tar file %s of size %d bytes\n", finfo.name, (int)finfo.size)); + DEBUG(0, ("restore tar file %s of size %.0f bytes\n", finfo.name, (double)finfo.size)); return(True); } @@ -1082,18 +1083,18 @@ static int get_dir(file_info2 finfo) */ static char * get_longfilename(file_info2 finfo) { - int namesize = finfo.size + strlen(cur_dir) + 2; + int namesize = strlen(finfo.name) + strlen(cur_dir) + 2; char *longname = malloc(namesize); int offset = 0, left = finfo.size; BOOL first = True; DEBUG(5, ("Restoring a long file name: %s\n", finfo.name)); - DEBUG(5, ("Len = %d\n", (int)finfo.size)); + DEBUG(5, ("Len = %.0f\n", (double)finfo.size)); if (longname == NULL) { DEBUG(0, ("could not allocate buffer of size %d for longname\n", - (int)(finfo.size + strlen(cur_dir) + 2))); + namesize)); return(NULL); } |