Skip to content
Snippets Groups Projects
Commit aba9ab9f authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Fixed method original_file_name

parent 9a16aa36
No related branches found
No related tags found
No related merge requests found
...@@ -57,12 +57,12 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti ...@@ -57,12 +57,12 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti
file : :py:class:`File` or a derivative file : :py:class:`File` or a derivative
The File objects for which the file name should be retrieved The File objects for which the file name should be retrieved
check_existence : bool check_existence : bool
Check if the original file exists? Check if the original file exists? IGNORED: ALWAYS CHECK
Return value : str Return value : str
The original file name for the given File object The original file name for the given File object
""" """
# check if directory is set
# check if directory is set
original_directory = self.original_directory original_directory = self.original_directory
if file.modality=="photo": if file.modality=="photo":
if file.client.original_database=="xm2vts": if file.client.original_database=="xm2vts":
...@@ -73,10 +73,9 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti ...@@ -73,10 +73,9 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti
if not original_directory or not self.original_extension: if not original_directory or not self.original_extension:
raise ValueError("The original_directory and/or the original_extension were not specified in the constructor.") raise ValueError("The original_directory and/or the original_extension were not specified in the constructor.")
# extract file name # extract file name
#file_name = file.make_path(original_directory, self.original_extension)
file_name="" file_name=""
if check_existence:
if type(self.original_extension) is list: if type(self.original_extension) is list:
for e in self.original_extension: for e in self.original_extension:
file_name = file.make_path(original_directory, e) file_name = file.make_path(original_directory, e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment