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:
|
if opts.command == "list" or opts.command is None:
|
||||||
""" List shares """
|
""" List shares """
|
||||||
|
|
||||||
if opts.name:
|
name = None
|
||||||
if os.path.isdir(os.path.join(cwd, opts.name)):
|
try:
|
||||||
opts.name = os.path.basename(os.path.realpath(os.path.join(cwd, opts.name)))
|
name = opts.name
|
||||||
list_folders(opts.root, verbose=opts.verbose, filter_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":
|
if opts.command == "del":
|
||||||
""" Delete due shares """
|
""" Delete due shares """
|
||||||
|
|||||||
Reference in New Issue
Block a user