Closed Bug 255735 Opened 21 years ago Closed 21 years ago

"cannot be found" opening file:///directory containing broken symbolic link (symlink).

Categories

(Core :: Networking: File, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 207973

People

(Reporter: gilmap, Assigned: darin.moz)

References

()

Details

(Keywords: verifyme)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803 When a file: URL identifies a directory containing a broken symlink, opening the directory fails with "! The file ... cannot be found." (There are no broken links in the path to the directory itself.) Reproducible: Always Steps to Reproduce: sh-2.05b$ uname -a Darwin PaulGilm.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh powerpc sh-2.05b$ ... I create a directory: sh-2.05b$ mkdir /Users/paulgilm/testzilla sh-2.05b$ and in Mozilla, I type and open the URL for that directory: file://localhost/Users/paulgilm/testzilla Mozilla displays the expected trivial page. Now I create a deliberately broken symlink: sh-2.05b$ ln -s /no/such/file /Users/paulgilm/testzilla/fubar sh-2.05b$ cat /Users/paulgilm/testzilla/fubar cat: /Users/paulgilm/testzilla/fubar: No such file or directory sh-2.05b$ In Mozilla, I click "Reload" and get: ! The file /Users/paulgilm/testzilla cannot be found. Please check the location and try again. So I remove the broken symlink: sh-2.05b$ rm /Users/paulgilm/testzilla/fubar sh-2.05b$ Now, "Reload" refreshes the page without error. ISTR a similar problem with Netscape, but I never analyzed it to this level of detail. Actual Results: "! The file /Users/paulgilm/testzilla cannot be found." is displayed as an alert. Expected Results: The contents of /Users/paulgilm/testzilla except for the broken symlink, fubar, should be displayed, or the contents should be displayed with an indication that "fubar" is a broken symlink. Thanks, gil ISTR a similar problem with Netscape. My surmise is that a subroutine is looping over entries in the directory, doing a stat() on each. On getting error status from stat() for the broken symlink, it does "return -1" when "continue" would be more appropriate. The caller observes the error status and errno==ENOENT and reports the entire directory unavailable.
*** This bug has been marked as a duplicate of 207973 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Keywords: verifyme
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.