Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Folder X action output includes menu separators #8

Open
robjwells opened this issue Jan 11, 2022 · 0 comments
Open

Default Folder X action output includes menu separators #8

robjwells opened this issue Jan 11, 2022 · 0 comments

Comments

@robjwells
Copy link

robjwells commented Jan 11, 2022

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")
 	});
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant