cp fails in this symlink case, kernel 2.4.25, reiserfs + ext2
From: Martin Rode
Date: Wed Apr 07 2004 - 12:42:27 EST
Dear developers,
After 10 years with linux I am happy I can report something :-).
I don't know 100% if is a bug, but I think it is.
The example below fails on reiserfs as well as on ext2 for me. I dont
think it should fail, or am I missing something?
Please cc me personally, I am not a subscriber.
Kernel testet: 2.4.[25|19]
Filesystems testet: reiserfs, ext2
Take Care,
Martin
How to reproduce:
-----------------
In any directory try this:
1) mkdir -p alpha/gamma beta
2) (cd alpha; ln -s ../beta .; ln -s gamma latest;)
3) echo "Test" > alpha/gamma/myfile
4) Check
apu:/home/martin/tmp/bug# find -exec file {} \;
.: directory
./alpha: directory
./alpha/gamma: directory
./alpha/gamma/myfile: ASCII text
./alpha/beta: symbolic link to `../beta'
./alpha/latest: symbolic link to `gamma'
./beta: directory
5) cp fails
apu:/home/martin/tmp/bug# (cd alpha/beta; cp ../latest/myfile .)
cp: cannot stat `../latest/myfile': No such file or directory
6) cp ok
apu:/home/martin/tmp/bug# (cd alpha/; cp latest/myfile beta && echo
"ok")
ok
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/