Ticket #1143: fix-add-command.diff
File fix-add-command.diff, 1.0 KB (added by , 15 years ago) |
---|
-
deluge/ui/console/commands/add.py
105 105 # This path does not exist, so lets do a listdir on it's parent 106 106 # and find any matches. 107 107 ret = [] 108 for f in os.listdir(os.path.dirname(line)):109 if f.startswith(os.path.split(line)[1]):110 p = os.path.join(os.path.dirname(line), f)111 108 112 if os.path.isdir(p): 113 p += "/" 114 ret.append(p) 109 if os.path.isdir(os.path.dirname(line)): 110 for f in os.listdir(os.path.dirname(line)): 111 if f.startswith(os.path.split(line)[1]): 112 p = os.path.join(os.path.dirname(line), f) 115 113 114 if os.path.isdir(p): 115 p += "/" 116 ret.append(p) 117 116 118 return ret