Skip to content

Commit

Permalink
BugFix: Ignore hidden files in workspaces folder
Browse files Browse the repository at this point in the history
All files saved under the workspaces directory are displayed in the open workspace
prompt. Under certain circumstances, unwanted files would be displayed accordingly.

On Mac OS X for instance, a .DS_STORE file can be created under the workspaces
directory which will obfuscate the true workspaces.

This commit ignores any 'hidden' folders within the workspaces directory. As an alternative
fix, we could have only shown files that were with the '.ws' extension, but this may be
too restrictive under some circumstances. Perhaps the user changes the extension in the settings?

We can revisit as needed if this solution proves insufficient.
  • Loading branch information
jmooney committed May 6, 2019
1 parent b84bdea commit 9d92cd7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions easy-workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ def getAllWorkspaceFiles(self):
workspaceFiles = []
for root, dirs, files in os.walk(workspacesDir):
for file in files:
# ignore any hidden files
if file.startswith('.'):
continue

# trim base workspace directory for display
subdir = root[len(workspacesDir):]
workspaceFiles.append(os.path.join(subdir, file))
Expand Down

0 comments on commit 9d92cd7

Please sign in to comment.