Fix incorrect path when getting *.txt files

Closes #28
This commit is contained in:
Nathan Lovato
2020-03-01 05:39:44 -06:00
parent 1717837d34
commit f80758d517

View File

@@ -41,7 +41,7 @@ the Doom Emacs distribution, which flattens the package's
structure."
(with-temp-buffer
(let (this-directory requested-path file-path)
(setq this-directory (file-name-directory "gdscript-mode.el"))
(setq this-directory (file-name-directory (or load-file-name buffer-file-name)))
(setq requested-path (concat this-directory file-path-relative))
(setq file-path (if (file-readable-p requested-path)
requested-path