Author: marek
Date: 2005-09-28 08:42:41 -0400 (Wed, 28 Sep 2005)
New Revision: 50939

Modified:
   trunk/mcs/mcs/driver.cs
Log:
2005-09-28  Marek Safar  <[EMAIL PROTECTED]>

        Fix #76255.
        * driver.cs: Fix compilation files with full root path.

Modified: trunk/mcs/mcs/driver.cs
===================================================================
--- trunk/mcs/mcs/driver.cs     2005-09-28 12:25:16 UTC (rev 50938)
+++ trunk/mcs/mcs/driver.cs     2005-09-28 12:42:41 UTC (rev 50939)
@@ -1320,10 +1320,14 @@
                                return true;
                        }
 
-                       Report.Error (2007, "Unrecognized command-line option: 
`{0}'", option);
                        return false;
                }
 
+               static void Error_WrongOption (string option)
+               {
+                       Report.Error (2007, "Unrecognized command-line option: 
`{0}'", option);
+               }
+
                static string [] AddArgs (string [] args, string [] extra_args)
                {
                        string [] new_args;
@@ -1434,13 +1438,19 @@
                                                string csc_opt = "/" + 
arg.Substring (1);
                                                if (CSCParseOption (csc_opt, 
ref args, ref i))
                                                        continue;
+
+                                               Error_WrongOption (arg);
                                                return false;
                                        } else {
-                                               // Need to skip `/home/test.cs' 
however /test.cs is considered as error
-                                               if (arg [0] == '/' && 
(arg.Length < 2 ||  arg.IndexOf ('/', 2) == -1)){
+                                               if (arg [0] == '/'){
                                                        if (CSCParseOption 
(arg, ref args, ref i))
                                                                continue;
-                                                       return false;
+
+                                                       // Need to skip 
`/home/test.cs' however /test.cs is considered as error
+                                                       if (arg.Length < 2 || 
arg.IndexOf ('/', 2) == -1) {
+                                                               
Error_WrongOption (arg);
+                                                               return false;
+                                                       }
                                                }
                                        }
                                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to