[PATCH 08/19] fs: Fix finding correct directory for mkdir/rmdir
Sascha Hauer
s.hauer at pengutronix.de
Tue Apr 3 00:48:40 PDT 2018
When there are links in the path mkdir/rmdir are called with then
canonicalize_path is needed which resolves the links.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
fs/fs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fs.c b/fs/fs.c
index 92f336b821..b66cc9b178 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1660,7 +1660,7 @@ int mkdir (const char *pathname, mode_t mode)
{
struct fs_driver_d *fsdrv;
struct fs_device_d *fsdev;
- char *p = normalise_path(pathname);
+ char *p = canonicalize_path(pathname);
char *freep = p;
int ret;
struct stat s;
@@ -1700,7 +1700,7 @@ int rmdir (const char *pathname)
{
struct fs_driver_d *fsdrv;
struct fs_device_d *fsdev;
- char *p = normalise_path(pathname);
+ char *p = canonicalize_path(pathname);
char *freep = p;
int ret;
struct stat s;
--
2.16.1
More information about the barebox
mailing list