diff --git a/sleap/gui/dataviews.py b/sleap/gui/dataviews.py index 009403916..cb467dbcb 100644 --- a/sleap/gui/dataviews.py +++ b/sleap/gui/dataviews.py @@ -399,7 +399,8 @@ def item_to_data(self, obj, item: "Video"): data = {} for property in self.properties: if property == "name": - data[property] = getattr(item, "filename").split("/")[-1] + filename = getattr(item, "filename") + name = Path(filename).name elif property == "filepath": splitted = getattr(item, "filename").split("/")[:-1] data[property] = "/".join(splitted)