Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Path from 'path';
import stripJsonComments from 'strip-json-comments';
import ignore from 'ignore';
import sshConfig from 'ssh-config';
import { multipleHostsEnabled, getObject, hasProject, logger, traverseTree, validateConfig, resolveHome, mkdirSyncRecursive } from './helpers';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all

import { multipleProjects, getObject, hasProject, logger, traverseTree, validateConfig, resolveHome, mkdirSyncRecursive } from './helpers';
import Directory from './directory';
import Progress from './progress';
import FTP from './connectors/ftp';
Expand Down Expand Up @@ -335,7 +335,7 @@ export default class Client {
getProjectPath() {
let projectPath = null;

if (multipleHostsEnabled() === true) {
if (multipleProjects() === true) {
const $selectedDir = $('.tree-view .selected');
const $currentProject = $selectedDir.hasClass('project-root') ? $selectedDir : $selectedDir.closest('.project-root');
projectPath = $currentProject.find('> .header span.name').data('path');
Expand Down
2 changes: 1 addition & 1 deletion lib/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"type": "object",
"title": "Beta strategies",
"properties": {
"multipleHosts": {
"multipleProjects": {
"type": "boolean",
"title": "",
"default": false,
Expand Down
4 changes: 2 additions & 2 deletions lib/directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import path from 'path';
import { Emitter } from 'event-kit';
import { multipleHostsEnabled, simpleSort } from './helpers';
import { multipleProjects, simpleSort } from './helpers';
import File from './file';

class Directory {
Expand Down Expand Up @@ -227,7 +227,7 @@ class Directory {
return p;
}

return multipleHostsEnabled() === true ? this.client.projectPath : atom.project.getPaths()[0];
return multipleProjects() === true ? this.client.projectPath : atom.project.getPaths()[0];
}

get remote() {
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const checkIgnoreRemote = item => (item && !atom.project.remoteftp.checkI
export const checkIgnoreLocal = item => (!atom.project.remoteftp.checkIgnore(item));
export const checkPaths = (index, elem) => (elem.getPath ? elem.getPath() : '');
export const hasProject = () => atom.project && atom.project.getPaths().length;
export const multipleHostsEnabled = () => atom.config.get('remote-ftp.beta.multipleHosts');
export const multipleProjectsEnabled = () => atom.config.get('remote-ftp.beta.multipleProjects');
export const hasOwnProperty = ({ obj, prop }) => Object.prototype.hasOwnProperty.call(obj, prop);
export const splitPaths = path => path.replace(/^\/+/, '').replace(/\/+$/, '').split('/');

Expand Down
2 changes: 1 addition & 1 deletion lib/remote-ftp.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default {
// NOTE: if there is a project folder & show view on startup
// is true, show the Remote FTP sidebar
if (hasProject()) {
// NOTE: setTimeout is for when multiple hosts option is true
// NOTE: setTimeout is for when multiple projects option is true
setTimeout(() => {
const conf = new File(this.client.getConfigPath());

Expand Down