no need to track has_untitleds anymore
@@ -46,14 +46,13 @@ def get_common_parent(paths):
def create_path_dict(x):
abs_dict = {}
- has_untitleds = False
+ base_dir = ""
for vid in x:
view = sublime.View(vid)
if view.file_name():
abs_dict[vid] = view.file_name()
else:
abs_dict[vid] = "<untitled " + str(view.buffer_id()) + ">"
- has_untitleds = True
if len(abs_dict) == 1:
for vid, path in abs_dict.items():
@@ -61,7 +60,7 @@ def create_path_dict(x):
rel_paths = {vid: file_name}
else:
base_dir = get_common_parent(abs_dict.values())
- if has_untitleds or not base_dir:
+ if not base_dir:
rel_paths = abs_dict
else:
rel_paths = {
