LaunchBarActions icon indicating copy to clipboard operation
LaunchBarActions copied to clipboard

Default Folder X action output includes menu separators

Open robjwells opened this issue 3 years ago • 0 comments

Default Folder X allows you to include separator lines in its menus to group together files, but these also appear in its scripting output as DXMenuSeparator. These appear as paths in the LaunchBar action's output, as if referring to a file called DXMenuSeparator in the action’s Scripts folder, and raise an error when accessed.

Adding a filter after the map in getDFXData.scpt is enough to remove these:

diff --git a/original.js b/revised.js
index bcfa6e8..44627ed 100644
--- a/original.js
+++ b/revised.js
@@ -23,5 +23,7 @@ function run(argument) {
 function processPaths(paths) {
 	return paths.map(function(obj) {
 		return {path: obj.toString()}
+	}).filter(function(obj) {
+		return !obj.path.includes("DXMenuSeparator")
 	});
 }

robjwells avatar Jan 11 '22 17:01 robjwells