diff --git a/lib/client/konsole.js b/lib/client/konsole.js index 93803398..ab4ec148 100644 --- a/lib/client/konsole.js +++ b/lib/client/konsole.js @@ -1,10 +1,9 @@ /* global CloudCmd */ /* global Util */ /* global DOM */ -/* global CloudFunc */ /* global Console */ -(function(CloudCmd, Util, DOM, CloudFunc) { +(function(CloudCmd, Util, DOM) { 'use strict'; CloudCmd.Konsole = ConsoleProto; @@ -52,7 +51,7 @@ var command = Console.getPromptText(), path = DOM.getCurrentDirPath(); - path = CloudFunc.rmLastSlash(path); + path = rmLastSlash(path); command += path; Console.setPromptText(command); @@ -60,6 +59,10 @@ }); } + function rmLastSlash(str) { + return str.replace(/\/$/, ''); + } + this.show = function(callback) { if (Loaded) CloudCmd.View.show(Element, { @@ -87,4 +90,4 @@ init(); } -})(CloudCmd, Util, DOM, CloudFunc); +})(CloudCmd, Util, DOM);