You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2012/12/04 14:09:45 UTC

svn commit: r1416921 - /commons/proper/daemon/branches/1.0.x/src/native/unix/native/home.c

Author: mturk
Date: Tue Dec  4 13:09:44 2012
New Revision: 1416921

URL: http://svn.apache.org/viewvc?rev=1416921&view=rev
Log:
DAEMON-268: Fix regression in -home directive

Modified:
    commons/proper/daemon/branches/1.0.x/src/native/unix/native/home.c

Modified: commons/proper/daemon/branches/1.0.x/src/native/unix/native/home.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/branches/1.0.x/src/native/unix/native/home.c?rev=1416921&r1=1416920&r2=1416921&view=diff
==============================================================================
--- commons/proper/daemon/branches/1.0.x/src/native/unix/native/home.c (original)
+++ commons/proper/daemon/branches/1.0.x/src/native/unix/native/home.c Tue Dec  4 13:09:44 2012
@@ -212,10 +212,10 @@ static home_data *find(char *path)
     home_data *data = NULL;
     int x = 0;
 
-    if (path == NULL || *path == '\0' || *path == '/') {
+    if (path == NULL || *path == '\0' || strcmp(path, "/") == 0) {
         log_debug("Home not specified on command line, using environment");
         path = getenv("JAVA_HOME");
-        if (path == NULL || *path == '\0' || *path == '/') {
+        if (path == NULL || *path == '\0' || strcmp(path, "/") == 0) {
             /* guard against empty JAVA_HOME */
             path = NULL;
         }