fix bug in default command
This commit is contained in:
13
flit.py
13
flit.py
@@ -403,10 +403,15 @@ if __name__ == "__main__":
|
||||
if opts.command == "list" or opts.command is None:
|
||||
""" List shares """
|
||||
|
||||
if opts.name:
|
||||
if os.path.isdir(os.path.join(cwd, opts.name)):
|
||||
opts.name = os.path.basename(os.path.realpath(os.path.join(cwd, opts.name)))
|
||||
list_folders(opts.root, verbose=opts.verbose, filter_name=opts.name)
|
||||
name = None
|
||||
try:
|
||||
name = opts.name
|
||||
except AttributeError:
|
||||
pass
|
||||
if name:
|
||||
if os.path.isdir(os.path.join(cwd, name)):
|
||||
name = os.path.basename(os.path.realpath(os.path.join(cwd, name)))
|
||||
list_folders(opts.root, verbose=opts.verbose, filter_name=name)
|
||||
|
||||
if opts.command == "del":
|
||||
""" Delete due shares """
|
||||
|
||||
Reference in New Issue
Block a user