diff --git a/lib/client/dom.js b/lib/client/dom.js index ccbf7d4e..8b3fc1e5 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -694,9 +694,10 @@ var CloudCmd, Util, DOM, CloudFunc; if (xhr.status === 200 /* OK */) { var lData = lJqXHR.response; - /* If it's json - parse it as json */ - if (lType && Util.isContainStr(lType, TYPE_JSON) ) - lData = Util.parseJSON(lJqXHR.response) || lJqXHR.response; + if (p.dataType !== 'text') + /* If it's json - parse it as json */ + if (lType && Util.isContainStr(lType, TYPE_JSON) ) + lData = Util.parseJSON(lJqXHR.response) || lJqXHR.response; if ( Util.isFunction(p.success) ) p.success(lData, lJqXHR.statusText, lJqXHR); @@ -1381,7 +1382,9 @@ var CloudCmd, Util, DOM, CloudFunc; if ( this.isCurrentIsDir(lCurrentFile) ) - lPath += '?json'; + lPath += '?json'; + else + lParams.dataType = 'text'; if (!lParams.url) lParams.url = CloudFunc.FS + lPath;