Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure secrets file is not other-accessible, and owned by root if the
[rsync/rsync.git]
/
exclude.c
diff --git
a/exclude.c
b/exclude.c
index
11d5eb0
..
109ee8d
100644
(file)
--- a/
exclude.c
+++ b/
exclude.c
@@
-301,6
+301,17
@@
void add_exclude_line(char *p)
free(p);
}
free(p);
}
+void add_include_line(char *p)
+{
+ char *tok;
+ if (!p || !*p) return;
+ p = strdup(p);
+ if (!p) out_of_memory("add_include_line");
+ for (tok=strtok(p," "); tok; tok=strtok(NULL," "))
+ add_exclude(tok, 1);
+ free(p);
+}
+
static char *cvs_ignore_list[] = {
"RCS","SCCS","CVS","CVS.adm","RCSLOG","cvslog.*",
static char *cvs_ignore_list[] = {
"RCS","SCCS","CVS","CVS.adm","RCSLOG","cvslog.*",
@@
-321,7
+332,7
@@
void add_cvs_excludes(void)
add_exclude(cvs_ignore_list[i], 0);
if ((p=getenv("HOME")) && strlen(p) < (MAXPATHLEN-12)) {
add_exclude(cvs_ignore_list[i], 0);
if ((p=getenv("HOME")) && strlen(p) < (MAXPATHLEN-12)) {
- slprintf(fname,sizeof(fname)
-1
, "%s/.cvsignore",p);
+ slprintf(fname,sizeof(fname), "%s/.cvsignore",p);
add_exclude_file(fname,0,0);
}
add_exclude_file(fname,0,0);
}