You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If UserDirectory(owner_id) does not contain the file, it is assumed that it is in CommonFolder(self.config.common_folder()).
This leads to the later error message: No object to import.<br>* No .txt or .tsv file was found, of which name starts with 'ecotaxa'. It is not obvious from that message that the supplied path was wrong.
It would be better to validate the path early on.
Also, UserDirectory.contains is a coarse heuristic. Furthermore, this would be the place to fix #56 and #60:
I would let UserDirectory and CommonFolder calculate the absolute path of the supplied filename and check which of both exists (and is below the user or common directory). The only remaining problem would be that a name could exist in both directories, so that the choice is ambiguous.
The text was updated successfully, but these errors were encountered:
ecotaxa_back/py/API_operations/imports/ImportBase.py
Line 38 in 5e22ac2
If
UserDirectory(owner_id)
does not contain the file, it is assumed that it is inCommonFolder(self.config.common_folder())
.This leads to the later error message:
No object to import.<br>* No .txt or .tsv file was found, of which name starts with 'ecotaxa'.
It is not obvious from that message that the supplied path was wrong.It would be better to validate the path early on.
Also,
UserDirectory.contains
is a coarse heuristic. Furthermore, this would be the place to fix #56 and #60:I would let
UserDirectory
andCommonFolder
calculate the absolute path of the supplied filename and check which of both exists (and is below the user or common directory). The only remaining problem would be that a name could exist in both directories, so that the choice is ambiguous.The text was updated successfully, but these errors were encountered: