don't indiscriminately use relative file name

This commit is contained in:
Mark Oteiza 2016-09-27 12:07:08 -04:00
parent a1633c271d
commit 16be18350c

View File

@ -83,7 +83,10 @@
(defconst systemd-unit-directives (defconst systemd-unit-directives
(eval-when-compile (eval-when-compile
(with-temp-buffer (with-temp-buffer
(insert-file-contents "unit-directives.txt") (insert-file-contents
(let ((f "unit-directives.txt"))
(if (null load-file-name) f
(expand-file-name f (file-name-directory load-file-name)))))
(split-string (buffer-string)))) (split-string (buffer-string))))
"Configuration directives for systemd.") "Configuration directives for systemd.")
@ -96,7 +99,10 @@
(defconst systemd-network-directives (defconst systemd-network-directives
(eval-when-compile (eval-when-compile
(with-temp-buffer (with-temp-buffer
(insert-file-contents "network-directives.txt") (insert-file-contents
(let ((f "network-directives.txt"))
(if (null load-file-name) f
(expand-file-name f (file-name-directory load-file-name)))))
(split-string (buffer-string)))) (split-string (buffer-string))))
"Network configuration directives for systemd.") "Network configuration directives for systemd.")