diff options
-rw-r--r-- | com32/lib/sys/module/common.c | 13 | ||||
-rw-r--r-- | core/include/fs.h | 2 |
2 files changed, 5 insertions, 10 deletions
diff --git a/com32/lib/sys/module/common.c b/com32/lib/sys/module/common.c index eeb26075..19742e65 100644 --- a/com32/lib/sys/module/common.c +++ b/com32/lib/sys/module/common.c @@ -64,6 +64,10 @@ static FILE *findpath(char *name) char *p, *n; int i; + f = fopen(name, "rb"); /* for full path */ + if (f) + return f; + p = PATH; again: i = 0; @@ -74,15 +78,6 @@ again: if (*p == ':') p++; - if (path[0] == '.' && i == 1) { - if (!core_getcwd(path, sizeof(path))) { - DBG_PRINT("Could not get cwd\n"); - return NULL; - } - - i = strlen(path); - } - n = name; while (*n && i < FILENAME_MAX) path[i++] = *n++; diff --git a/core/include/fs.h b/core/include/fs.h index 481e085c..ded8c154 100644 --- a/core/include/fs.h +++ b/core/include/fs.h @@ -179,7 +179,7 @@ static inline struct file *handle_to_file(uint16_t handle) return handle ? &files[handle-1] : NULL; } -#define PATH_DEFAULT ".:/boot/syslinux/:/boot/" +#define PATH_DEFAULT "/boot/syslinux/:/boot/" extern char *PATH; /* fs.c */ |