Doc.
[rsync/rsync.git] / syscall.c
index d5b567f..3780bac 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -84,6 +84,9 @@ int do_open(char *pathname, int flags, mode_t mode)
        /* for Windows */
        flags |= O_BINARY;
 #endif
+       /* some systems can't handle a double / */
+       if (pathname[0] == '/' && pathname[1] == '/') pathname++;
+
        return open(pathname, flags, mode);
 }
 
@@ -114,6 +117,9 @@ char *do_mktemp(char *template)
 {
        if (dry_run) return NULL;
        if (read_only) {errno = EROFS; return NULL;}
+       
+        /* TODO: Replace this with a good builtin mkstemp, perhaps
+        * from OpenBSD.  Some glibc versions are buggy.  */
        return mktemp(template);
 }