wimfs_rename(): Use path_basename(to)
authorEric Biggers <ebiggers3@gmail.com>
Tue, 1 Jan 2013 05:48:15 +0000 (23:48 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 1 Jan 2013 05:48:15 +0000 (23:48 -0600)
(Was broken several ocmmits ago.)

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)