]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
* setup.c (main): Disallow running setup.exe from the "root".
authorChristopher Faylor <me@cgf.cx>
Mon, 17 Apr 2000 04:01:31 +0000 (04:01 +0000)
committerChristopher Faylor <me@cgf.cx>
Mon, 17 Apr 2000 04:01:31 +0000 (04:01 +0000)
ChangeLog
setup.c

index d2ba2318123b39b1150c7bc53ea55cc0c52f293b..ae3ce50d660d87e1f569910dff1b42ccf5f7f11f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Apr 17 00:00:49 2000  Christopher Faylor <cgf@cygnus.com>
+
+       * setup.c (main): Disallow running setup.exe from the "root".
+
 Sun Apr 16 18:50:58 2000  Christopher Faylor <cgf@cygnus.com>
 
        Use "warning" function, where appropriate to output warnings.
diff --git a/setup.c b/setup.c
index 3911ae32d8da82a0362695d0b29aa79cb94e40a0..a9c7320884fd9eb755dc6e616da2ade39100d4fe 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -1047,7 +1047,7 @@ mkmount (const char *mountexedir, const char *root, const char *dospath,
   return xsystem (buffer) == 0;
 }
 
-static char rev[] = " $Revision$";
+static char rev[] = " $Revision$ ";
 int
 main ()
 {
@@ -1057,7 +1057,7 @@ main ()
   char *revn, *p;
 
   revn = strchr (rev, ':');
-  if (!revn || (p = strchr (revn, ' ')) == NULL)
+  if (!revn || (p = strchr (revn + 2, ' ')) == NULL)
     revn = "";
   else
     {
@@ -1068,7 +1068,8 @@ main ()
     }
 
   printf ( "\n\n\n\n"
-"This is the Cygwin setup utility%s, built on " __DATE__ " " __TIME__ ".\n\n"
+"This is the Cygwin setup utility%s,\n"
+"built on " __DATE__ " " __TIME__ ".\n\n"
 "Use this program to install the latest version of the Cygwin Utilities\n"
 "from the Internet.\n\n"
 "Alternatively, if you already have already downloaded the appropriate files\n"
@@ -1126,6 +1127,11 @@ main ()
       for (done = 0; !done;)
        {
          root = prompt ("Root directory", defroot);
+         if (strcmpi (root, wd) == 0)
+           {
+             printf ("Please do not use the current directory as the root directory.\nYou should run setup.exe from a temporary directory.\n");
+             continue;
+           }
          if (strchr (root, ' '))
            {
              char *temp;
This page took 0.039871 seconds and 5 git commands to generate.