Use F_ROOTDIR() in place of dir.root.
authorWayne Davison <wayned@samba.org>
Sun, 17 Dec 2006 00:40:36 +0000 (00:40 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 17 Dec 2006 00:40:36 +0000 (00:40 +0000)
log.c
sender.c

diff --git a/log.c b/log.c
index fedeacd..d5308b2 100644 (file)
--- a/log.c
+++ b/log.c
@@ -516,9 +516,9 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                                strlcpy(c, fname, MAXPATHLEN);
                        } else
                                c = f_name(file, NULL);
-                       if (am_sender && file->dir.root) {
+                       if (am_sender && F_ROOTDIR(file)) {
                                pathjoin(buf2, sizeof buf2,
-                                        file->dir.root, c);
+                                        F_ROOTDIR(file), c);
                                clean_fname(buf2, 0);
                                if (fmt[1]) {
                                        strlcpy(c, buf2, MAXPATHLEN);
index eee2a02..3808cda 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -128,9 +128,9 @@ void successful_send(int ndx)
                return;
 
        file = the_file_list->files[ndx];
-       if (file->dir.root) {
+       if (F_ROOTDIR(file)) {
                offset = stringjoin(fname, sizeof fname,
-                                   file->dir.root, "/", NULL);
+                                   F_ROOTDIR(file), "/", NULL);
        } else
                offset = 0;
        f_name(file, fname + offset);
@@ -202,9 +202,9 @@ void send_files(struct file_list *flist, int f_out, int f_in)
                        continue;
 
                file = flist->files[i];
-               if (file->dir.root) {
+               if (F_ROOTDIR(file)) {
                        /* N.B. We're sure that this fits, so offset is OK. */
-                       offset = strlcpy(fname, file->dir.root, sizeof fname);
+                       offset = strlcpy(fname, F_ROOTDIR(file), sizeof fname);
                        if (!offset || fname[offset-1] != '/')
                                fname[offset++] = '/';
                } else