wimfs_rename(): Use path_basename(to)
[wimlib] / src / mount_image.c
index 905157c08101e111cfe78d6cc0fcfe7f05f60689..e5d7fb98462b4fc5a853e918a82348d137f0f5ba 100644 (file)
@@ -2002,7 +2002,7 @@ static int wimfs_rename(const char *from, const char *to)
                        return -ENOTDIR;
        }
 
-       ret = set_dentry_name(src, to);
+       ret = set_dentry_name(src, path_basename(to));
        if (ret != 0)
                return -ENOMEM;
        if (dst)