Check for a slash before unlinking.
authorScott Cantor <cantor.2@osu.edu>
Tue, 1 Jul 2003 15:46:42 +0000 (15:46 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 1 Jul 2003 15:46:42 +0000 (15:46 +0000)
shar/shar.c

index 67e7fcd..81c1e70 100644 (file)
@@ -237,8 +237,8 @@ static int parse_args(int argc, char* argv[])
   while ((opt = getopt(argc, argv, "fFh")) > 0) {
     switch (opt) {
     case 'f':
-      /* XXX: I know that this is a string on Unix */
-      unlink (shib_target_sockname());
+      if (*(shib_target_sockname())=='/')
+        unlink(shib_target_sockname());
       break;
 #if 0
     case 'F':