浏览代码

Fixes the returned value of file absolute path getter

Adrien Panay 8 年前
父节点
当前提交
2419051714
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. 4 8
      tracim/tracim/lib/content.py

+ 4 - 8
tracim/tracim/lib/content.py 查看文件

474
         dpt = DepotManager.get()
474
         dpt = DepotManager.get()
475
         # python 3.6 PEP 526 -- Syntax for Variable Annotations
475
         # python 3.6 PEP 526 -- Syntax for Variable Annotations
476
         # https://www.python.org/dev/peps/pep-0526/
476
         # https://www.python.org/dev/peps/pep-0526/
477
-        # dpt_path: str = dpt.storage_path
478
-        # dpt_file_dir: str = item.revision.depot_file_uid.file_id
479
-        # dpt_file_path: str = dpt_path + dpt_file_dir + dpt_file_name
480
-        dpt_path = dpt.storage_path
481
-        dpt_file_dir = revision.depot_file_uid.file_id
482
-        dpt_file_path = '{0}{1}/file'.format(dpt_path, dpt_file_dir)
483
-
484
-        return file_from_depot.name
477
+        # dpt_file_path: str = dpt.get(dpt_stored_file)._file_path
478
+        dpt_file_path = dpt.get(dpt_stored_file)._file_path
479
+
480
+        return dpt_file_path
485
 
481
 
486
     def get_one_by_label_and_parent(
482
     def get_one_by_label_and_parent(
487
             self,
483
             self,