The Samba-Bugzilla – Attachment 1978 Details for
Bug 3852
Enable 'newer' on 'mput' statements for CIFS (+ patch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Added functionality: mput now also checks for newer
diff (text/plain), 2.40 KB, created by
Jurjen Stellingwerff
on 2006-06-23 08:44:18 UTC
(
hide
)
Description:
Added functionality: mput now also checks for newer
Filename:
MIME Type:
Creator:
Jurjen Stellingwerff
Created:
2006-06-23 08:44:18 UTC
Size:
2.40 KB
patch
obsolete
>diff -ur samba-3.0.22-orig/source/client/client.c samba-3.0.22/source/client/client.c >--- samba-3.0.22-orig/source/client/client.c 2006-01-25 00:46:41.000000000 +0100 >+++ samba-3.0.22/source/client/client.c 2006-06-23 14:51:51.000000000 +0200 >@@ -1412,32 +1412,34 @@ > > isdir = False; > if (!match || !gen_fnmatch(expression, dname)) { >- if (recurse) { >- ret = stat(path, &statbuf); >- if (ret == 0) { >- if (S_ISDIR(statbuf.st_mode)) { >- isdir = True; >- ret = file_find(list, path, expression, False); >- } >- } else { >- d_printf("file_find: cannot stat file %s\n", path); >- } >- >- if (ret == -1) { >- SAFE_FREE(path); >- sys_closedir(dir); >- return -1; >+ ret = stat(path, &statbuf); >+ if (recurse && ret == 0) { >+ if (S_ISDIR(statbuf.st_mode)) { >+ isdir = True; >+ ret = file_find(list, path, expression, False); > } >+ } else { >+ d_printf("file_find: cannot stat file %s\n", path); > } >- entry = SMB_MALLOC_P(struct file_list); >- if (!entry) { >- d_printf("Out of memory in file_find\n"); >+ >+ if (ret == -1) { >+ SAFE_FREE(path); > sys_closedir(dir); > return -1; > } >- entry->file_path = path; >- entry->isdir = isdir; >- DLIST_ADD(*list, entry); >+ if (statbuf.st_mtime >= newer_than || isdir == True) { >+ entry = SMB_MALLOC_P(struct file_list); >+ if (!entry) { >+ d_printf("Out of memory in file_find\n"); >+ sys_closedir(dir); >+ return -1; >+ } >+ entry->file_path = path; >+ entry->isdir = isdir; >+ DLIST_ADD(*list, entry); >+ } else { >+ DEBUG(3,("newer_than %s failed\n", path)); >+ } > } else { > SAFE_FREE(path); > } >@@ -2727,7 +2729,7 @@ > {"mkdir",cmd_mkdir,"<directory> make a directory",{COMPL_NONE,COMPL_NONE}}, > {"more",cmd_more,"<remote name> view a remote file with your pager",{COMPL_REMOTE,COMPL_NONE}}, > {"mput",cmd_mput,"<mask> put all matching files",{COMPL_REMOTE,COMPL_NONE}}, >- {"newer",cmd_newer,"<file> only mget files newer than the specified local file",{COMPL_LOCAL,COMPL_NONE}}, >+ {"newer",cmd_newer,"<file> only mget or mput files newer than the specified local file",{COMPL_LOCAL,COMPL_NONE}}, > {"open",cmd_open,"<mask> open a file",{COMPL_REMOTE,COMPL_NONE}}, > {"print",cmd_print,"<file name> print a file",{COMPL_NONE,COMPL_NONE}}, > {"prompt",cmd_prompt,"toggle prompting for filenames for mget and mput",{COMPL_NONE,COMPL_NONE}},
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3852
: 1978