Skip to content

Commit fbc1bf2

Browse files
committed
Fixed import feature for txt
1 parent db6439f commit fbc1bf2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

addon/globalPlugins/Access8Math/lib/viewHTML.py

+7
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ def __init__(self, path=None, exist=True):
7272
metadata = json.load(open(metadata_file))
7373
self.raw_entry = metadata["entry"]
7474
else:
75+
metadata_file = os.path.join(path, 'Access8Math.json')
76+
metadata = {
77+
"entry": os.path.basename(path),
78+
}
79+
dst = os.path.join(os.path.dirname(path), 'Access8Math.json')
80+
with open(dst, 'w', encoding='utf8') as f:
81+
json.dump(metadata, f)
7582
self._raw_folder = os.path.dirname(path)
7683
self.raw_entry = os.path.basename(path)
7784

0 commit comments

Comments
 (0)