projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
freqtabs are per-table
[pspp]
/
src
/
language
/
utilities
/
cd.c
diff --git
a/src/language/utilities/cd.c
b/src/language/utilities/cd.c
index cae84eb3c46b43e6f06bf2b3bb43e941a517bdd4..ec5e7646f4ee1bba3fb610d9aa7f45fc7ba1d43c 100644
(file)
--- a/
src/language/utilities/cd.c
+++ b/
src/language/utilities/cd.c
@@
-34,20
+34,21
@@
cmd_cd (struct lexer *lexer, struct dataset *ds UNUSED)
{
char *path = 0;
{
char *path = 0;
- if (
! lex_force_string (lexer))
+ if (! lex_force_string (lexer))
goto error;
path = utf8_to_filename (lex_tokcstr (lexer));
goto error;
path = utf8_to_filename (lex_tokcstr (lexer));
- if (
-1 == chdir (path)
)
+ if (
-1 == chdir (path)
)
{
int err = errno;
{
int err = errno;
- msg (SE, _("Cannot change directory to %s:
%s
"), path,
+ msg (SE, _("Cannot change directory to %s:
%s
"), path,
strerror (err));
goto error;
}
free (path);
strerror (err));
goto error;
}
free (path);
+ lex_get (lexer);
return CMD_SUCCESS;
return CMD_SUCCESS;