Commit 4d762e41 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

FileHandler2: fixed handling of target-less menus

parent 8b7d00c8
...@@ -22,15 +22,10 @@ define([ ...@@ -22,15 +22,10 @@ define([
makeMenu: function(info) { makeMenu: function(info) {
var menu = this._filterMenu(this.handlersBase, info); var menu = this._filterMenu(this.handlersBase, info);
// need the open with menu? if (!info.data && !info.items) { // nothing directly hit (just in a folder)
if (!info.data) { // nothing directly hit (just in a folder)
var n = "", p = info.pathBase.split("/");
while((n = p.pop()) == "");
info.pathBase = p.join("/") || "/";
n = n || "/";
info.data = { info.data = {
root: n, root: ".",
name: n, name: ".",
ext: "", ext: "",
type: "d", type: "d",
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment