flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1394062 - /incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java
Date Thu, 04 Oct 2012 13:28:21 GMT
Author: cframpton
Date: Thu Oct  4 13:28:21 2012
New Revision: 1394062

URL: http://svn.apache.org/viewvc?rev=1394062&view=rev
Log:
If there is trouble on the log copy print the error to the log so it is easier to diagnose
the problem.

Modified:
    incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java

Modified: incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java?rev=1394062&r1=1394061&r2=1394062&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java (original)
+++ incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java Thu Oct  4
13:28:21 2012
@@ -910,6 +910,9 @@ public class Runner {
 
 			System.out.println ("TROUBLE on the log copy.");
 
+			if (e.getLocalizedMessage() != null)
+				System.out.println(e.getLocalizedMessage());
+			
 			/// if we're depending on the log, note that we're bailing here
 			if (getResultsFromLog)
 				unpackResult (sourceName, "Missing Results");
@@ -1030,6 +1033,7 @@ public class Runner {
 
 
 	private static final String winDir = "Application Data";
+	private static final String win7Dir = "AppData/Roaming";
 	private static final String macEnd = "Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt";
 	private static final String linuxEnd = ".macromedia/Flash_Player/Logs/flashlog.txt";
 	private static final String winEnd = "Macromedia/Flash Player/Logs/flashlog.txt";
@@ -1038,16 +1042,22 @@ public class Runner {
 
 	private static String getLogSource() {
 
-
 		String start= System.getProperties ().getProperty ("user.home");
 		String ret = null;
 
 		String tmp = null;
 		String os = System.getProperties ().getProperty ("os.name");
 
-
 		/// need testing of the mac & Linux parts of this.
-		if (os.indexOf ("Windows") !=  -1) {
+		// Just guessing that "Windows Vista" is the correct string for Vista.
+
+		// On Windows 7 the value of user.home is the registry key
+		// "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop]"
+		// with the last directory stripped.
+
+		if (os.indexOf ("Windows 7") != -1 || os.indexOf ("Windows Vista") != -1) {
+			ret = start + File.separator + win7Dir + File.separator + winEnd;
+		} else if (os.indexOf ("Windows") !=  -1) {
 			ret = start + File.separator + winDir + File.separator + winEnd;
 		} else if (os.indexOf ("Linux") !=  -1) {
 			ret = start + File.separator + linuxEnd;



Mime
View raw message