projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The length of the string is now not always the
[pspp]
/
src
/
language
/
utilities
/
include.c
diff --git
a/src/language/utilities/include.c
b/src/language/utilities/include.c
index d7b102836e460cf0f05650d201d718b546bb0db5..fe98aeb87f3347b82b61853adc70360cee87f132 100644
(file)
--- a/
src/language/utilities/include.c
+++ b/
src/language/utilities/include.c
@@
-16,7
+16,9
@@
#include <config.h>
#include <ctype.h>
#include <config.h>
#include <ctype.h>
+#include <errno.h>
#include <stdlib.h>
#include <stdlib.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>
@@
-26,7
+28,6
@@
#include <data/file-name.h>
#include "dirname.h"
#include <data/file-name.h>
#include "dirname.h"
-#include "canonicalize.h"
#include "xalloc.h"
#include "gettext.h"
#include "xalloc.h"
#include "gettext.h"
@@
-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;
}