Skip to content

Commit

Permalink
1.0.rev35
Browse files Browse the repository at this point in the history
- I was using a forward slash forcefully when writing to Profiles.ini, this is not compatible with Ubuntu, and I don't know for other systems, but the way MXR does it is with getRelativePath so I did same here. {Fixes #6}
  • Loading branch information
Noitidart committed May 3, 2014
1 parent 6c0a6de commit ece8379
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,20 @@ function createProfile(refreshIni, profName) {
//check if profile exists first
var numProfiles = profToolkit.profileCount; //Object.keys(ini) - 1;
var dirName = saltName(profName);

//get relative path
var DefProfRt = FileUtils.getFile('DefProfRt', []);
var mRootDir = new FileUtils.File(OS.Constants.Path.userApplicationDataDir);
var IniPathStr = FileUtils.getFile('DefProfRt', [dirName]);
var PathToWriteToIni = IniPathStr.getRelativeDescriptor(mRootDir); //returns "Profiles/folderName"
//end get relative path

ini[profName] = {
num: numProfiles,
props: {
Name: profName,
IsRelative: 1,
Path: 'Profiles/' + dirName
Path: PathToWriteToIni
}
}
console.log('created ini entry for profName', ini[profName]);
Expand Down

0 comments on commit ece8379

Please sign in to comment.