damn, I had implicitly assumed signed characters when writing the
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index 80f18e4..b3aaff1 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -323,7 +323,7 @@ static void send_file_name(int f,struct file_list *flist,char *fname)
       out_of_memory("send_file_name");
   }
 
-  if (strcmp(file->name,".") && strcmp(file->name,"/")) {
+  if (strcmp(file->name,"/")) {
     flist->files[flist->count++] = *file;    
     send_file_entry(file,f);
   }
@@ -424,7 +424,10 @@ struct file_list *send_file_list(int f,int argc,char *argv[])
     p = strrchr(fname,'/');
     if (p) {
       *p = 0;
-      dir = fname;
+      if (p == fname) 
+       dir = "/";
+      else
+       dir = fname;      
       fname = p+1;      
     }
     if (!*fname)