aboutsummaryrefslogtreecommitdiff
path: root/modules/ui_extra_networks.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r--modules/ui_extra_networks.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py
index 8142811a..a7d3bc79 100644
--- a/modules/ui_extra_networks.py
+++ b/modules/ui_extra_networks.py
@@ -210,10 +210,12 @@ class ExtraNetworksPage:
"""
List of default keys used for sorting in the UI.
"""
+ pth = Path(path)
+ stat = pth.stat()
return {
- "date_created": int(Path(path).stat().st_ctime or 0),
- "date_modified": int(Path(path).stat().st_mtime or 0),
- "name": Path(path).name.lower(),
+ "date_created": int(stat.st_ctime or 0),
+ "date_modified": int(stat.st_mtime or 0),
+ "name": pth.name.lower(),
}
def find_preview(self, path):