mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 21:18:55 -04:00
ubifs: Correct dereferencing of files-after-symlinks
Files in directories which are symlinked to were not dereferenced correctly in last commit. E.g., with a symlink /boot/lnk -> /boot/real_dir loading /boot/lnk/uImage will fail. This patch fixes that by simply seeing to it that the target base directory has a slash after it. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
984f10baac
commit
ef37c6835e
@ -439,7 +439,7 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Relative to cur dir */
|
/* Relative to cur dir */
|
||||||
sprintf(buf, "%s%s",
|
sprintf(buf, "%s/%s",
|
||||||
link_name, next == NULL ? "" : next);
|
link_name, next == NULL ? "" : next);
|
||||||
memcpy(symlinkpath, buf, sizeof(buf));
|
memcpy(symlinkpath, buf, sizeof(buf));
|
||||||
next = name = symlinkpath;
|
next = name = symlinkpath;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user