Dereference symlinks on B_REFS_RECEIVED. This way dropping a symlink to an html file actually opens the target, and succeeds in finding its related files. One can still enter the path to the symlink itself in the url bar as file:// anyway.

svn path=/trunk/netsurf/; revision=5503
This commit is contained in:
François Revel 2008-10-07 00:42:14 +00:00
parent 6fd280ad2e
commit 21f541fdef

View File

@ -405,6 +405,16 @@ void nsbeos_scaffolding_dispatch_event(nsbeos_scaffolding *scaffold, BMessage *m
BNode node(path.Path());
if (node.InitCheck() < B_OK)
break;
if (node.IsSymLink()) {
// dereference the symlink
BEntry entry(path.Path(), true);
if (entry.InitCheck() < B_OK)
break;
if (entry.GetPath(&path) < B_OK)
break;
if (node.SetTo(path.Path()) < B_OK)
break;
}
attr_info ai;
if (node.GetAttrInfo("META:url", &ai) >= B_OK) {