[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: |
Tue, 03 Dec 2013 17:38:16 +0000 |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 13/12/03 17:38:16
Modified files:
. : qe.c
Log message:
display error msg or new current directory in cd command
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.100&r2=1.101
Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- qe.c 30 Nov 2013 12:12:40 -0000 1.100
+++ qe.c 3 Dec 2013 17:38:16 -0000 1.101
@@ -368,12 +368,14 @@
do_previous_window(s);
}
-void do_cd(EditState *s, const char *name)
+void do_cd(EditState *s, const char *path)
{
char buf[MAX_FILENAME_SIZE];
- if (chdir(name)) {
- put_status(s, "Cannot change directory to '%s'", name);
+ canonicalize_absolute_path(buf, sizeof(buf), path);
+
+ if (chdir(buf)) {
+ put_status(s, "Cannot change directory to '%s'", buf);
} else {
getcwd(buf, sizeof(buf));
put_status(s, "Current directory: %s", buf);
- [Qemacs-commit] qemacs qe.c,
Charlie Gordon <=