patch-2.1.109 linux/fs/vfat/namei.c

Next file: linux/include/asm-alpha/linux_logo.h
Previous file: linux/fs/proc/root.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.108/linux/fs/vfat/namei.c linux/fs/vfat/namei.c
@@ -1105,6 +1105,9 @@
 	fil.f_pos = 0;
 	vf.name = qname->name;
 	vf.len = qname->len;
+	while (vf.len && vf.name[vf.len-1] == '.') {
+		vf.len--;
+	}
 	vf.new_filename = new_filename;
 	vf.found = 0;
 	vf.posix = MSDOS_SB(sb)->options.posixfs;
@@ -1135,7 +1138,7 @@
 		goto cleanup;
 	}
 	
-	res = vfat_build_slots(dir, qname->name, qname->len, ds, 
+	res = vfat_build_slots(dir, qname->name, vf.len, ds, 
 			       &slots, &is_long);
 	if (res < 0) goto cleanup;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov