From 894d873bfe80059266bd70092ad88ebbbe39ad4d Mon Sep 17 00:00:00 2001 From: Bradley Erickson Date: Sat, 11 Jun 2022 11:06:52 -0400 Subject: [PATCH] Fixed walk_dir to work with Windows file system `walk_dir` was using the incorrect slashes on Windows filesystem, thus causing the `page_filename` to be set to the empty string. @AnnMarieW confirmed these changes still work on non-Windows systems. --- dash/dash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/dash.py b/dash/dash.py index 71bf360834..d2f6b8fe5b 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -2171,7 +2171,7 @@ def _import_layouts_from_pages(self): continue page_filename = os.path.join(root, file).replace("\\", "/") - _, _, page_filename = page_filename.partition(walk_dir + "/") + _, _, page_filename = page_filename.partition(walk_dir.replace("\\", "/") + "/") page_filename = page_filename.replace(".py", "").replace("/", ".") pages_folder = (