From ddfccd54fba7ea7c0df8a172693572f621938ced Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 7 Jul 2014 06:35:55 -0400 Subject: [PATCH] fix(dom) getCurrentPath: wrong path when width changed panels: two -> one --- lib/client/dom.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index fd5c6736..d2a792d7 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -1109,10 +1109,13 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * @param currentFile - current file by default */ this.getCurrentPath = function(currentFile) { - var name = this.getCurrentName(currentFile), - path = this.getCurrentDirPath(); + var current = currentFile || DOM.getCurrentFile(), + element = DOM.getByTag('a', current)[0], + path = element.getAttribute('href'); - return path + name; + path = Util.rmStr(path, CloudFunc.FS); + + return path; }; /**