diff options
author | Alek Du <alek.du@intel.com> | 2010-02-08 10:40:09 +0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-10 16:00:52 -0800 |
commit | 7c503d3286ce0b562ef075480029338556b306d7 (patch) | |
tree | f02f44b8d37fb53a954849860f1f2551e2bdf636 | |
parent | e8d0e6fb18aae44474e864d8040d5ed44ff6acab (diff) | |
download | syslinux-7c503d3286ce0b562ef075480029338556b306d7.tar.gz |
pathbased: fix relative path in the extlinux installer
Fix a bug in the extlinux installer where the relative path is not
found correctly.
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | extlinux/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extlinux/main.c b/extlinux/main.c index 2cfb1ea6..c28f1907 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -386,7 +386,7 @@ int patch_file_and_bootblock(int fd, const char *dir, int devfd) } subpath = strchr(dirpath, '\0'); - while (--subpath > dirpath) { + while (--subpath >= dirpath) { if (*subpath == '/') { *subpath = '\0'; if (lstat(dirpath, &xdst) || dirst.st_dev != xdst.st_dev) { |