Merge pull request #601 from TeckniX/use-document-folder

Moved Kitematic dir to Documents
This commit is contained in:
Jeffrey Morgan 2015-06-05 09:40:05 -07:00
commit 340e7574dc
2 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,7 @@ var ContainerHomeFolder = React.createClass({
}, (index) => {
if (index === 0) {
var volumes = _.clone(this.props.container.Volumes);
var newHostVolume = path.join(util.home(), 'Kitematic', this.props.container.Name, containerVolume);
var newHostVolume = path.join(util.home(), util.documents(), 'Kitematic', this.props.container.Name, containerVolume);
volumes[containerVolume] = newHostVolume;
var binds = _.pairs(volumes).map(function (pair) {
if(util.isWindows()) {

View File

@ -39,6 +39,9 @@ module.exports = {
home: function () {
return process.env[this.isWindows() ? 'USERPROFILE' : 'HOME'];
},
documents: function () {
return this.isWindows() ? 'My\ Documents' : 'Documents';
},
supportDir: function () {
var dirs = ['Library', 'Application\ Support', 'Kitematic'];
var acc = this.home();