mirror of
https://github.com/mathew-kurian/Scribe.js
synced 2025-04-24 22:34:58 +00:00
Merge pull request #7 from nover/master
Updates to make activeUserDir slicing work properly
This commit is contained in:
commit
459d4dc64e
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ var createDir = function(){
|
|||
var getUser = function(){
|
||||
try {
|
||||
activeUserDir = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'].toLowerCase();
|
||||
activeUserDir = activeUserDir.slice(activeUserDir.lastIndexOf('\\') + 1);
|
||||
activeUserDir = activeUserDir.slice(activeUserDir.lastIndexOf((process.platform == 'win32') ? '\\':'/') + 1);
|
||||
} catch(e){
|
||||
activeUserDir = $.defaultUserDir;
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Reference in a new issue