Attempt to avoid a problem with --copy-unsafe-links where a symlink was
[rsync/rsync.git] / t_unsafe.c
index 943185a..12908f4 100644 (file)
@@ -2,7 +2,7 @@
  * Test harness for unsafe_symlink().  Not linked into rsync itself.
  *
  * Copyright (C) 2002 Martin Pool
- * Copyright (C) 2003-2008 Wayne Davison
+ * Copyright (C) 2003-2009 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 int dry_run = 0;
 int am_root = 0;
+int am_sender = 1;
 int read_only = 0;
 int list_only = 0;
+int human_readable = 0;
 int preserve_perms = 0;
 int preserve_executability = 0;
-short info_levels[10], debug_levels[10];
+short info_levels[COUNT_INFO], debug_levels[COUNT_DEBUG];
 
 int
 main(int argc, char **argv)
@@ -40,7 +42,7 @@ main(int argc, char **argv)
        }
 
        printf("%s\n",
-              unsafe_symlink(argv[1], argv[2]) ? "unsafe" : "safe");
+              unsafe_symlink(argv[1], path_depth(argv[2])) ? "unsafe" : "safe");
 
        return 0;
 }