diff --git a/[refs] b/[refs] index f22f6df2623c..f7a9782a7713 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 467c3d9cd541eef284ff8118069b088e015b8d6a +refs/heads/master: 40de9a7cebc4e0b23cd6863c84c2279f0ccadebb diff --git a/trunk/fs/hfsplus/dir.c b/trunk/fs/hfsplus/dir.c index 93fa45cc4810..33aab211695a 100644 --- a/trunk/fs/hfsplus/dir.c +++ b/trunk/fs/hfsplus/dir.c @@ -452,7 +452,10 @@ static int hfsplus_rename(struct inode *old_dir, struct dentry *old_dentry, /* Unlink destination if it already exists */ if (new_dentry->d_inode) { - res = hfsplus_unlink(new_dir, new_dentry); + if (S_ISDIR(new_dentry->d_inode->i_mode)) + res = hfsplus_rmdir(new_dir, new_dentry); + else + res = hfsplus_unlink(new_dir, new_dentry); if (res) return res; }