projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/stable'
[pspp]
/
src
/
language
/
utilities
/
include.c
diff --git
a/src/language/utilities/include.c
b/src/language/utilities/include.c
index 26c718a42de419ada022a35cb07b199dc2fd7406..fe98aeb87f3347b82b61853adc70360cee87f132 100644
(file)
--- a/
src/language/utilities/include.c
+++ b/
src/language/utilities/include.c
@@
-16,8
+16,9
@@
#include <config.h>
#include <ctype.h>
#include <config.h>
#include <ctype.h>
+#include <errno.h>
#include <stdlib.h>
#include <stdlib.h>
-#include <
libpspp/alloc
.h>
+#include <
string
.h>
#include <language/command.h>
#include <libpspp/message.h>
#include <libpspp/getl.h>
#include <language/command.h>
#include <libpspp/message.h>
#include <libpspp/getl.h>
@@
-25,9
+26,9
@@
#include <language/lexer/lexer.h>
#include <libpspp/str.h>
#include <data/file-name.h>
#include <language/lexer/lexer.h>
#include <libpspp/str.h>
#include <data/file-name.h>
-#include <dirname.h>
-#include <canonicalize.h>
+#include "dirname.h"
+#include "xalloc.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@
-191,8
+192,14
@@
parse_insert (struct lexer *lexer, char **filename)
return CMD_FAILURE;
}
return CMD_FAILURE;
}
- *filename = canonicalize_file_name (relative_filename);
- free (relative_filename);
+ *filename = relative_filename;
+ if (*filename == NULL)
+ {
+ msg (SE, _("Unable to open `%s': %s."),
+ relative_filename, strerror (errno));
+ free (relative_filename);
+ return CMD_FAILURE;
+ }
return CMD_SUCCESS;
}
return CMD_SUCCESS;
}