summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blossom2010-11-28 19:09:46 -0800
committerEric Blossom2010-11-28 19:09:46 -0800
commit1d8fb42db7d9f49ba0cf8b92d05e9f57e6e2826a (patch)
treed4baa32f9002fd7e190de39cdcc07173d3f96272
parentf65e80377e43de3635bf1ced46005ba7e6e8a1a5 (diff)
downloadgnuradio-1d8fb42db7d9f49ba0cf8b92d05e9f57e6e2826a.tar.gz
gnuradio-1d8fb42db7d9f49ba0cf8b92d05e9f57e6e2826a.tar.bz2
gnuradio-1d8fb42db7d9f49ba0cf8b92d05e9f57e6e2826a.zip
fix for xyzzy-search-path
-rw-r--r--gr-run-waveform/xyzzy-load.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/gr-run-waveform/xyzzy-load.c b/gr-run-waveform/xyzzy-load.c
index 695dba8f0..119dcd8c7 100644
--- a/gr-run-waveform/xyzzy-load.c
+++ b/gr-run-waveform/xyzzy-load.c
@@ -259,20 +259,15 @@ SCM_DEFINE (scm_xyzzy_search_path, "xyyzy-search-path", 2, 1, 0,
/* If the file exists at all, we should return it. If the
file is inaccessible, then that's an error. */
-
- /* Look in the fake filesystem for this file. If we find it, we prepend a
- magic number to the front so we can identify these special files later
- on when trying to read from them. */
- if (xyzzy_file_exists(filename_chars)) {
- filename = scm_from_locale_string (filename_chars);
- } else {
- if (stat (buf.buf, &mode) == 0
- && ! (mode.st_mode & S_IFDIR))
- {
- result = scm_from_locale_string (buf.buf);
- goto end;
- }
- }
+ fprintf(stderr, "TRACE %s: %d: \"%s\"\n", __FUNCTION__, __LINE__, buf.buf);
+
+ if (xyzzy_file_exists(buf.buf)
+ || (stat (buf.buf, &mode) == 0
+ && ! (mode.st_mode & S_IFDIR)))
+ {
+ result = scm_from_locale_string (buf.buf);
+ goto end;
+ }
}
if (!SCM_NULL_OR_NIL_P (exts))
@@ -295,4 +290,3 @@ scm_xyzzy_init (void)
{
scm_c_define_gsubr ("xyzzy-search-path", 2, 1, 0, (SCM (*)()) scm_xyzzy_search_path);
}
-