Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions applications/sam/sam_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,12 @@ def run(self, parser):
for inputPath in args.inputs:
items = []

# input is a directory
if os.path.isdir(inputPath):
items.append(sequenceParser.Item(sequenceParser.eTypeFolder, inputPath))
# else browse directory with a filter, to find the corresponding Item
# if the input is a file/link
if os.path.isfile(inputPath):
items.append(sequenceParser.Item(sequenceParser.eTypeFile, inputPath))
elif os.path.islink(inputPath):
items.append(sequenceParser.Item(sequenceParser.eTypeLink, inputPath))
# else browse in the extracted directory with the basename as filter
else:
# get path to browse
pathToBrowse = os.path.dirname(inputPath)
Expand Down