Changeset: cf520f1ac2ab for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf520f1ac2ab
Modified Files:
MonetDB5/src/mal/mal_import.mx
Branch: Jun2010
Log Message:
Restore old loading behaviour that was accidentially removed.
When looking up the script fails in the modpath, just try whatever was
given to also support loading scripts outside of the modpath.
diffs (23 lines):
diff -r 9afc509d5113 -r cf520f1ac2ab MonetDB5/src/mal/mal_import.mx
--- a/MonetDB5/src/mal/mal_import.mx Fri May 14 12:29:58 2010 +0200
+++ b/MonetDB5/src/mal/mal_import.mx Fri May 14 12:40:41 2010 +0200
@@ -65,10 +65,18 @@
malResolveFile(str fname)
{
char path[PATHLENGTH];
+ str script;
snprintf(path, PATHLENGTH, "%s", fname);
slash_2_dir_sep(path);
- return MSP_locate_script(path);
+ if ((script = MSP_locate_script(path)) == NULL) {
+ /* this function is also called for scripts that are not located
+ * in the modpath, so if we can't find it, just default to
+ * whatever was given, as it can be in current dir, or an
+ * absolute location to somewhere */
+ script = GDKstrdup(fname);
+ }
+ return script;
}
static stream *
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list