[Linux-NTFS-cvs] CVS: ntfsprogs/libntfs dir.c,1.57,1.58
Development moved to https://sourceforge.net/projects/ntfs-3g/
Brought to you by:
antona,
cha0smaster
From: Yura P. <yu...@de...> - 2006-06-03 22:09:39
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/libntfs In directory delta357.server4you.de:/tmp/cvs-serv13022/libntfs Modified Files: dir.c Log Message: ntfs_link(): prevent creating of recursive directary structure. FUSE incorrectly handles case insensitive filesystems: when I try to rename "/Dir" to "/DIR", ntfsmount receive rename("/Dir", "/DIR/Dir") call. This patch do not fix rename, but prevent fs corruption. I will mail Miklos about this problem. Index: dir.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/dir.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -p -r1.57 -r1.58 --- dir.c 3 Jun 2006 21:37:27 -0000 1.57 +++ dir.c 3 Jun 2006 22:09:24 -0000 1.58 @@ -1611,7 +1611,8 @@ int ntfs_link(ntfs_inode *ni, ntfs_inode int fn_len, err; ntfs_log_trace("Entering.\n"); - if (!ni || !dir_ni || !name || !name_len) { + if (!ni || !dir_ni || !name || !name_len || + ni->mft_no == dir_ni->mft_no) { err = errno; ntfs_log_error("Invalid arguments.\n"); goto err_out; |