[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs qe.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs qe.c |
Date: |
Sat, 15 Mar 2014 13:48:53 +0000 |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 14/03/15 13:48:53
Modified files:
. : qe.c
Log message:
fix small issues
* use startup value of current directory to load resources if invoked
as ./qe
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.156&r2=1.157
Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -b -r1.156 -r1.157
--- qe.c 12 Mar 2014 05:50:23 -0000 1.156
+++ qe.c 15 Mar 2014 13:48:53 -0000 1.157
@@ -7597,10 +7597,12 @@
/* compute resources path */
qs->res_path[0] = '\0';
- /* put source directory first if qe invoked as ./qe */
- // should use actual directory
+ /* put current directory first if qe invoked as ./qe */
if (stristart(qs->argv[0], "./qe", NULL)) {
- pstrcat(qs->res_path, sizeof(qs->res_path), ".:");
+ if (!getcwd(path, sizeof(path)))
+ strcpy(path, ".");
+ pstrcat(qs->res_path, sizeof(qs->res_path), path);
+ pstrcat(qs->res_path, sizeof(qs->res_path), ":");
}
/* put user directory before standard list */