feat: ignore items which start with underscore
This commit is contained in:
@@ -21,8 +21,8 @@ case $ACTION in
|
||||
esac;;
|
||||
icon)
|
||||
case $ITEM in
|
||||
"") cat Dyn-icon.png;; # Main menu icon
|
||||
"Item 1") cat Dyn-icon.png;;
|
||||
"") cat _icons/draw.png;; # Main menu icon
|
||||
"Item 1") cat _icons/draw.png;; # relative to root scripts dir
|
||||
*Status) status green;;
|
||||
esac;;
|
||||
*)
|
||||
|
||||
|
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 616 B |
@@ -248,7 +248,9 @@ func listDir(_ path: String) -> [Entry] {
|
||||
}
|
||||
// else: static menu
|
||||
for url in (try? FileManager.default.contentsOfDirectory(at: target, includingPropertiesForKeys: [.isDirectoryKey, .isExecutableKey])) ?? [] {
|
||||
if url.hasDirectoryPath || FileManager.default.isExecutableFile(atPath: url.path) {
|
||||
if url.hasDirectoryPath || FileManager.default.isExecutableFile(atPath: url.path),
|
||||
!url.lastPathComponent.hasPrefix("_")
|
||||
{
|
||||
rv.append(Entry(url))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user