Skip to content

Commit

Permalink
Update URL resolver to support home VFS (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Apr 10, 2020
1 parent a6a0a6c commit 7a283d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ export const urlResolver = configuration => {
metadata.type === 'icons' ? 'icons' : 'apps'
);

url = `${type}/${metadata.name}${path}`;
if (metadata._user) {
url = `vfs/readfile?path=${encodeURIComponent(`home:/.packages/${metadata.name}${path}`)}`;
} else {
url = `${type}/${metadata.name}${path}`;
}
}

return prefix
Expand Down

0 comments on commit 7a283d1

Please sign in to comment.