Skip to content

Commit f44b214

Browse files
committed
refactor(directory): 将 .clangd 目录更改为 .cache
重构目录创建逻辑,将原用于 .clangd 文件的目录更改为更通用的 .cache 目录,并更新相关文件路径和打印信息。
1 parent 95e5e4c commit f44b214

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ def create_clangd_directory():
128128
"""
129129
创建.clamd文件夹并写入.gitignore文件
130130
"""
131-
clangd_dir = os.path.join('.', '.clangd')
131+
cache_dir = os.path.join('.', '.cache')
132132
try:
133-
os.makedirs(clangd_dir, exist_ok=True)
134-
gitignore_path = os.path.join(clangd_dir, '.gitignore')
133+
os.makedirs(cache_dir, exist_ok=True)
134+
gitignore_path = os.path.join(cache_dir, '.gitignore')
135135
with open(gitignore_path, 'w', encoding='utf-8') as f:
136136
f.write('*')
137-
print("Successfully created .clangd directory and .gitignore file")
137+
print("Successfully created .cache directory and .gitignore file")
138138
except Exception as e:
139-
print(f"Failed to create .clangd directory or .gitignore file: {e}")
139+
print(f"Failed to create .cache directory or .gitignore file: {e}")
140140

141141

142142
def get_clangd_query_driver():

0 commit comments

Comments
 (0)