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
Add --bwlimit option contributed by Matthew Demicco and Jamie Gritton.
[rsync/rsync.git]
/
syscall.c
diff --git
a/syscall.c
b/syscall.c
index
5876066
..
56d88b4
100644
(file)
--- a/
syscall.c
+++ b/
syscall.c
@@
-76,12
+76,17
@@
int do_rmdir(char *pathname)
int do_open(char *pathname, int flags, mode_t mode)
{
int do_open(char *pathname, int flags, mode_t mode)
{
- if (dry_run) return -1;
+ if (flags != O_RDONLY) {
+ if (dry_run) return -1;
+ CHECK_RO
+ }
#ifdef O_BINARY
/* for Windows */
flags |= O_BINARY;
#endif
#ifdef O_BINARY
/* for Windows */
flags |= O_BINARY;
#endif
- CHECK_RO
+ /* some systems can't handle a double / */
+ if (pathname[0] == '/' && pathname[1] == '/') pathname++;
+
return open(pathname, flags, mode);
}
return open(pathname, flags, mode);
}