Commits

Peter Szilagyi committed a125744

Fixed an ordering bug in the last changeset.

  • Participants
  • Parent commits b312017

Comments (0)

Files changed (1)

elisp/omake/omake-file.el

 (defconst Omake.File.emacs-log-pid-dir
   (format "%s/%d" Omake.File.emacs-log-dir (emacs-pid)))
 
+(defun Omake.File.check-root-perms ()
+  "Because the /tmp/omake-server directory is shared between
+users, it needs to have appropriate permissions set.  In
+particular, call this function at least after potentially
+creating /tmp/omake-server with the default umask."
+  (let ((required #o1777)
+        (present (file-modes Omake.File.root)))
+    (unless (= required (logand required present))
+      (ignore-errors
+        ;; Don't try unless we can usefully report errors.
+        (when (called-interactively-p 'any)
+          (condition-case err (set-file-modes Omake.File.root (logor required present))
+            (error (message "Couldn't fix wrong permissions %o on %s: %s"
+                            present
+                            Omake.File.root
+                            (error-message-string err)))))))))
+
 (condition-case err
     (progn (make-directory Omake.File.emacs-log-pid-dir t)
            (Omake.File.check-root-perms))
 ;;        Omake.File.mode-log
 ;;        Omake.File.server-log))
 
-(defun Omake.File.check-root-perms ()
-  "Because the /tmp/omake-server directory is shared between
-users, it needs to have appropriate permissions set.  In
-particular, call this function at least after potentially
-creating /tmp/omake-server with the default umask."
-  (let ((required #o1777)
-        (present (file-modes Omake.File.root)))
-    (unless (= required (logand required present))
-      (ignore-errors
-        ;; Don't try unless we can usefully report errors.
-        (when (called-interactively-p 'any)
-          (condition-case err (set-file-modes Omake.File.root (logor required present))
-            (error (message "Couldn't fix wrong permissions %o on %s: %s"
-                            present
-                            Omake.File.root
-                            (error-message-string err)))))))))
-
 (provide 'omake-file)