Opened 11 years ago

Closed 11 years ago

#2672 closed bug (invalid)

[bfs]: cd .. does not work in deleted directory.

Reported by: emitrax Owned by: axeld
Priority: low Milestone: R1
Component: File Systems/BFS Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Although not dangerous, this should behave differently.

mkdir temp
cd temp
rm -rf ../temp
cd ..

expected behavior: last command should correctly cd'us to the parent directory actual behavior: cd ../: no such file or directory error returned.

Change History (6)

comment:1 by anevilyak, 11 years ago

That doesn't appear to be BFS-specific, more likely the VFS. In any case, I see the same behavior on FreeBSD here, though not on Linux.

comment:2 by emitrax, 11 years ago

I could only tested it in linux, and the behavior was like the one (I) expected. How BeOS behaves?

comment:3 by bga, 11 years ago

I just tried this under Linux on an nfs mounted disk:

bga@librarian:~/x$ cd .. bash: cd: ..: No such file or directory

Behaves exactly like Haiku.

comment:4 by anevilyak, 11 years ago

Hm..at least on Ubuntu with ReiserFS (all I have to test with Linux-wise) it works. FreeBSD concurs with your NFS experience though. It makes sense though, if you remove the directory then in theory the special files . and .. don't exist any more either.

comment:5 by emitrax, 11 years ago

I have gentoo with ext3. This might then be fs specific, unless linux VFS have changed lately (kernel 2.6.20 over here). I can't try this on BeOS unfortuntely.

comment:6 by bonefish, 11 years ago

Resolution: invalid
Status: newclosed

BeOS reports the same error. Interestingly on Solaris (SunOS 5.10) I get:

bolero bonefish 5 (~/tt): rmdir ~/tt
rmdir: directory "/home/tfs/bonefish/tt": Can't remove current directory or ..

Though it can easily be tricked:

bolero bonefish 7 (~/tt): (cd ..; rmdir tt)
bolero bonefish 8 (~/tt): cd ..
-bash: cd: ..: No such file or directory

Haiku's behavior seem OK. Closing.

Note: See TracTickets for help on using tickets.