search for: fnamecmp

Displaying 20 results from an estimated 57 matches for "fnamecmp".

2005 Jan 05
1
rsync filename heuristics
...: %s\n",fname,strerror(errno)); > + } > + > + return fd; > +} > > /* > * Acts on file number I from FLIST, whose name is fname. > @@ -203,9 +258,6 @@ > struct sum_struct *s; > int statret; > struct file_struct *file = flist->files[i]; > - char *fnamecmp; > - char fnamecmpbuf[MAXPATHLEN]; > - extern char *compare_dest; > extern int list_only; > extern int preserve_perms; > extern int only_existing; > @@ -341,82 +393,29 @@ > return; > } > > - fnamecmp = fname; > - > - if ((statret == -1) && (c...
2003 Oct 18
0
Added functionality --compare-file and --compare-auto
...it and/or modify it under the terms of the GNU General Public License as published by @@ -41,6 +42,8 @@ extern int always_checksum; extern int modify_window; extern char *compare_dest; +extern char *compare_file; +extern int compare_auto; extern int link_dest; @@ -357,29 +360,36 @@ fnamecmp = fname; - if ((statret == -1) && (compare_dest != NULL)) { - /* try the file at compare_dest instead */ + if ((statret == -1) && compare_auto) { + compare_file = findcomparename(fname,fnamecmpbuf); + } else if ((statret == -1) && (compare_dest != NULL)) { + snprintf(fn...
2004 Apr 15
0
Multiple compare-dest args
...-41,7 +41,7 @@ extern int io_timeout; extern int protocol_version; extern int always_checksum; -extern char *compare_dest; +extern char *compare_dest[]; extern int link_dest; @@ -69,13 +69,13 @@ if (always_checksum && S_ISREG(st->st_mode)) { char sum[MD4_SUM_LENGTH]; char fnamecmpdest[MAXPATHLEN]; + int i = 0; - if (compare_dest != NULL) { - if (access(fname, 0) != 0) { - pathjoin(fnamecmpdest, sizeof fnamecmpdest, - compare_dest, fname); - fname = fnamecmpdest; - } + while ((access(fname, 0) != 0) && compare_dest[i] != NULL) { + pathjoin(fnamec...
2004 Sep 02
1
--partiall-dir not behaving like it ought too
Hi, I have awaited the new release inorder to use the -"-partial-dir" option. But after testing it seems that it does not behave like it says on the tin. It will correctly move and rename the interrupted file to the declared directory, but it will not attempt to use it when the client attempts to rsync the file again. I have a Solaris 8 box running as a server (Matthew), and another
2008 May 08
1
Patch to not modify files in place unless "--inplace" option specified
...} - if (code != FNONE && verbose) + if ((iflags & ITEM_REPORT_CHANGE) && code != FNONE && verbose) rprintf(code, "%s\n", fname); #ifdef SUPPORT_HARD_LINKS if (preserve_hard_links && F_IS_HLINKED(file)) @@ -1776,13 +1800,31 @@ else if (fnamecmp_type == FNAMECMP_FUZZY) ; else if (unchanged_file(fnamecmp, file, &sx.st)) { + /* fnamecmp == fname, fnamecmp_type == FNAMECMP_FNAME */ + int iflags = 0; + if (partialptr) { do_unlink(partialptr); handle_partial_dir(partialptr, PDIR_DELETE); } - set_file_attrs(fname, file,...
2011 Apr 09
1
[Bug 8073] New: Regress: 3.0.8 cannot compile on freebsd
...: for each function it appears in.) Other notes: from 3.0.8 (using flist.c from 3.0.7 for convenient reporting of other warnings herein): gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c rsync.c -o rsync.o rsync.c: In function `set_file_attrs': rsync.c:378: warning: unused parameter `fnamecmp' gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c generator.c -o generator.o generator.c: In function `delete_item': generator.c:216: warning: `desc' might be used uninitialized in this function generator.c: In function `unchanged_attrs': generator.c:622: warning: unused par...
2003 Sep 03
1
[patch] replace dir with file error
...ieving revision 1.51 diff -u -r1.51 receiver.c --- receiver.c 21 Aug 2003 23:45:49 -0000 1.51 +++ receiver.c 2 Sep 2003 23:29:13 -0000 @@ -419,11 +419,23 @@ continue; } - if (fd1 != -1 && !S_ISREG(st.st_mode)) { - rprintf(FERROR,"%s : not a regular file (recv_files)\n",fnamecmp); - receive_data(f_in,NULL,-1,NULL,file->length); + if (fd1 != -1 && S_ISDIR(st.st_mode) && fnamecmp == fname) { + /* this special handling for directories + * wouldn't be necessary if robust_rename() + * and the underlying robust_unlink could cope + * with dire...
2002 Apr 23
1
patch: timeout problem solved
...write_int(f_out, sum1); + write_buf(f_out, &sum2[0], csum_length); len -= n1; offset += n1; } - - return s; } @@ -230,7 +200,6 @@ int fd; STRUCT_STAT st; struct map_struct *buf; - struct sum_struct *s; int statret; struct file_struct *file = flist->files[i]; char *fnamecmp; @@ -389,7 +358,7 @@ if (statret == -1) { if (errno == ENOENT) { write_int(f_out,i); - if (!dry_run) send_sums(NULL,f_out); + if (!dry_run) send_null_sums(f_out); } else { if (verbose > 1) rprintf(FERROR, RSYNC_NAME @@ -406,7 +375,7 @@ /* now pretend the file didn...
2002 Aug 02
1
[patch] --link-dest
...urn 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -356,6 +366,18 @@ statret = -1; if (statret == -1) errno = saveerrno; +#if HAVE_LINK + else if (link_dest && !dry_run) { + if (do_link(fnamecmpbuf, fname) != 0) { + if (verbose > 0) + rprintf(FINFO,"link %s => %s : %s\n", + fnamecmpbuf, + fname, + strerror(errno)); + } + fnamecmp = fnamecmpbuf; + } +#endif else fnamecmp = fnamecmpbuf; } Index: options.c ===================================...
2006 Sep 04
7
DO NOT REPLY [Bug 4079] New: rsync fails with --inplace, --link-dest and --no-whole-file
https://bugzilla.samba.org/show_bug.cgi?id=4079 Summary: rsync fails with --inplace, --link-dest and --no-whole- file Product: rsync Version: 2.6.8 Platform: x86 OS/Version: Linux Status: NEW Severity: major Priority: P3 Component: core AssignedTo: wayned@samba.org
2005 Jul 26
1
[patch] paranoid checksum checking
...full_fname (fnametmp)); + recv_ok = 0; + } + } + if ((recv_ok && (!delay_updates || !partialptr)) || inplace) { finish_transfer(fname, fnametmp, file, recv_ok, 1); if (partialptr != fname && fnamecmp == partialptr) {
2006 Oct 21
1
Rsync 2.6.9pre2 tries to read ACLs of nonexistent files
...is zero if and only if the destination file actually exists. However, back in lines 1210-1226, the generator sets real_ret to 0 if a basis file is found, even though the destination file does not exist: if (statret != 0 && basis_dir[0] != NULL) { int j = try_dests_reg(file, fname, ndx, fnamecmpbuf, &sx, itemizing, maybe_ATTRS_REPORT, code); if (j == -2) { if (remove_source_files == 1) goto return_with_success; goto cleanup; } if (j >= 0) { fnamecmp = fnamecmpbuf; fnamecmp_type = j; statret = 0; } } real_ret = statret; real_sx = sx; A few li...
2007 Oct 17
3
DO NOT REPLY [Bug 5022] New: FreeBSD 4.11 - Compilation Fails - uidlist.c - gcc2 / gcc3
...t.c -o flist.o gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c rsync.c -o rsync.o rsync.c: In function `read_ndx_and_attrs': rsync.c:215: warning: `flist' might be used uninitialized in this function rsync.c: In function `set_file_attrs': rsync.c:341: warning: unused parameter `fnamecmp' gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c generator.c -o generator.o generator.c: In function `unchanged_attrs': generator.c:518: warning: unused parameter `fname' generator.c: In function `itemize': generator.c:549: warning: unused parameter `fnamecmp' generator...
2015 Jan 16
3
wrong transfer of app packages using --backup
Dear All, I have been seeing some strange behavior using rsync 3.1.1 on OSX with the 3 standard patches applied when using the --backup and --backup-Dir options. This works as expected on 3.0.9, moving any files on dest that are not on source to the backup folder. If no changes then the backup folder is not even created. -aHAXN --fileflags --force-change --protect-decmpfs ?delete --backup
2015 Jan 23
0
rsync 3.1.1 wrong transfer of app packages using --backup
...te) rsync.c calls make_backup and returns 1 when it encounters if (x_lstat(fname, &sx.st, NULL) < 0) return 1; the calling code in rsync.c: if ( make_backups > 0 && overwriting_basis) { int ok = make_backup(fname, False); if (!ok) return 1; if (ok == 1 && fnamecmp == fname) fnamecmp = get_backup_name(fname); } in 3.0.9 get_backup_name just returns the backup_Dir path but in 3.1.1 it proceeds to copy_valid_path which then creates the folder structure for the DIR, which in this case is an APP package or rtfd file which should not be copied at all. I don?...
2002 May 16
1
[patch] suggestions for -v option
...(double)stats.total_written, (double)stats.total_read, --- rsync-2.5.5/generator.c.orig Mon Mar 25 06:54:31 2002 +++ rsync-2.5.5/generator.c Tue May 14 16:40:28 2002 @@ -417,7 +417,7 @@ } if (update_only && cmp_modtime(st.st_mtime,file->modtime)>0 && fnamecmp == fname) { - if (verbose > 1) + if (verbose > 0) rprintf(FINFO,"%s is newer\n",fname); return; }
2004 Apr 14
2
Another feature proposal and implementation plan: --strip-prefix
...atter would be more like patch -p, but I think it's less safe. Perhaps multiple --strip-prefix directives should be allowed so that a single invocation of rsync can handle more complicated situations. I think this can be relatively cleanly implemented in recv_files; in fact, the line "fnamecmp=fname;" in reciever.c seems to be exactly the hook required. Like my previous email, I would like to ask for advice and suggestions so that my implementation will be most useful! Thanks, -Ed
2008 Feb 27
2
DO NOT REPLY [Bug 5287] New: FreeBSD pre10 compilation warnings report
...nts gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c <.c> -o <.o> make rsync.c: In function `read_ndx_and_attrs': rsync.c:213: warning: `flist' might be used uninitialized in this function rsync.c: In function `set_file_attrs': rsync.c:343: warning: unused parameter `fnamecmp' generator.c: In function `delete_item': generator.c:212: warning: `desc' might be used uninitialized in this function generator.c: In function `unchanged_attrs': generator.c:555: warning: unused parameter `fname' generator.c: In function `itemize': generator.c:597: warning:...
2008 Mar 06
1
rsync: always modify atime of all destination files
...information > diff -u rsync-2.6.2.orig/generator.c rsync-2.6.2/generator.c > --- rsync-2.6.2.orig/generator.c Thu Apr 15 13:55:23 2004 > +++ rsync-2.6.2/generator.c Fri Jul 23 15:47:40 2004 > @@ -471,8 +471,10 @@ > } > > if (skip_file(fname, file, &st)) { > - if (fnamecmp == fname) > + if (fnamecmp == fname) { > set_perms(fname,file,&st,1); > + update_atime(fname); > + } > return; > } > > diff -u rsync-2.6.2.orig/proto.h rsync-2.6.2/proto.h > --- rsync-2.6.2.orig/proto.h Thu Apr 22 06:58:09 2004 > +++ rsync-2.6.2/prot...
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
...file->gid) { + return 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -352,6 +363,17 @@ statret = -1; if (statret == -1) errno = saveerrno; +#if HAVE_LINK + else if (link_dest) + if (do_link(fnamecmpbuf, fname) != 0) { + if (verbose > 0) + rprintf(FINFO,"link %s => %s : %s\n", + fnamecmpbuf, + fname, + strerror(errno)); + fnamecmp = fnamecmpbuf; + } +#endif else fnamecmp = fnamecmpbuf; } Index: options.c ==============================================...