mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
update shell
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
7946cb8d09
commit
1353d2e1a5
1 changed files with 8 additions and 1 deletions
|
|
@ -726,7 +726,14 @@ public:
|
|||
virtual void didLoadModule(ContextRef* relatedContext, OptionalRef<ScriptRef> referrer, ScriptRef* loadedModule) override
|
||||
{
|
||||
std::string path;
|
||||
if (referrer && loadedModule->src()->length() && loadedModule->src()->charAt(0) != '/') {
|
||||
bool isAbs = false;
|
||||
if (loadedModule->src()->length() && loadedModule->src()->charAt(0) == '/') {
|
||||
isAbs = true;
|
||||
} else if (loadedModule->src()->length() > 3 && loadedModule->src()->charAt(1) == ':' && loadedModule->src()->charAt(2) == '\\') {
|
||||
isAbs = true;
|
||||
}
|
||||
|
||||
if (referrer && loadedModule->src()->length() && !isAbs) {
|
||||
path = absolutePath(referrer->src()->toStdUTF8String(), loadedModule->src()->toStdUTF8String());
|
||||
} else {
|
||||
path = absolutePath(loadedModule->src()->toStdUTF8String());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue