mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 13:37:02 +03:00
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:
parent
6fd280ad2e
commit
21f541fdef
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user