From 6cdba4cebbd0f21449283607b05b64114e8ad68f Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 9 Dec 2023 21:05:16 -0600 Subject: [PATCH] handle extensions correctly --- api/onnx_web/convert/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/onnx_web/convert/utils.py b/api/onnx_web/convert/utils.py index fd02f671..015b13cd 100644 --- a/api/onnx_web/convert/utils.py +++ b/api/onnx_web/convert/utils.py @@ -384,7 +384,7 @@ def build_cache_paths( if format is not None: basename = path.basename(name) _filename, ext = path.splitext(basename) - if ext is None: + if ext is None or ext == '': name = f"{name}.{format}" paths = [