We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f93b5a6 commit 6c8b11dCopy full SHA for 6c8b11d
1 file changed
examples/C/virtual_file_system/vfs.py
@@ -1,3 +1,14 @@
1
+# WebUI Library
2
+# https://webui.me
3
+# https://github.com/webui-dev/webui
4
+# Copyright (c) 2020-2025 Hassan Draga.
5
+# Licensed under MIT License.
6
+# All rights reserved.
7
+# Canada.
8
+#
9
+# WebUI Virtual File System Generator
10
+# v1.1
11
+
12
import os
13
import sys
14
@@ -53,7 +64,10 @@ def generate_vfs_header(directory, output_header):
53
64
54
65
header.write('static const char* index_files[] = {\n')
55
66
for dir_path, index_path in index_files.items():
56
- header.write(f' "{dir_path}/", "{index_path}",\n')
67
+ if dir_path == "/":
68
+ header.write(f' "/", "{index_path}",\n')
69
+ else:
70
+ header.write(f' "{dir_path}/", "{index_path}",\n')
57
71
header.write(' NULL\n')
58
72
header.write('};\n\n')
59
73
0 commit comments