From 38bc16b1c391c44b90b721934c97f3eac275a7e1 Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Sat, 22 Dec 2007 23:07:20 +0000
Subject: [PATCH] - fix permissions for Java Application Stubs used in MacOS X app bundles so that they are usable from within WebStart installation.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index 63efce0..5a96c05 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -1218,33 +1218,28 @@
    * @return the file system permissions for the file.
    */
   static public String getFileSystemPermissions(File file)
-    {
+  {
     String perm;
     String name = file.getName();
     if (file.getParent().endsWith(
         File.separator + Installation.WINDOWS_BINARIES_PATH_RELATIVE) ||
         file.getParent().endsWith(
-        File.separator + Installation.UNIX_BINARIES_PATH_RELATIVE))
-    {
-      if (name.endsWith(".bat"))
-      {
+        File.separator + Installation.UNIX_BINARIES_PATH_RELATIVE)) {
+      if (name.endsWith(".bat")) {
         perm = "644";
       }
-      else
-      {
+      else {
         perm = "755";
       }
-    }
-    else if (name.endsWith(".sh"))
-    {
+    } else if (name.endsWith(".sh")) {
       perm = "755";
     } else if (name.endsWith(Installation.UNIX_SETUP_FILE_NAME) ||
             name.endsWith(Installation.UNIX_UNINSTALL_FILE_NAME) ||
-            name.endsWith(Installation.UNIX_UPGRADE_FILE_NAME))
-    {
+            name.endsWith(Installation.UNIX_UPGRADE_FILE_NAME)) {
       perm = "755";
-    } else
-    {
+    } else if (name.endsWith(Installation.MAC_JAVA_APP_STUB_NAME)) {
+      perm = "755";
+    } else {
       perm = "644";
     }
     return perm;

--
Gitblit v1.10.0