fragment: server cache / relative path resolve / auto reload
This commit is contained in:
parent
0c9d2a2e4b
commit
e5bbb15071
5 changed files with 102 additions and 18 deletions
|
|
@ -22,7 +22,7 @@ module.exports = {
|
|||
resolveHomeDir: function(p) {
|
||||
// Resolve '~' to user's home directory
|
||||
if (!p) return ''
|
||||
return String(p).replace(/^~/, process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'])
|
||||
return String(p).replace(/^(~|\/~)/, process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'])
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue