Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "sakura_flow",
"version": "0.3.0",
"version": "0.3.1",
"name": "Sakura Flow",
"description": "一款专注于依赖管理与深度交互的 MCDReforged 待办事项插件。",
"author": "Sakura-Ex",
Expand Down
2 changes: 2 additions & 0 deletions sakura_flow/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def acquire(self):
start_time = time.time()
while True:
try:
# 确保锁文件的父目录存在
os.makedirs(os.path.dirname(self.lock_file), exist_ok=True)
# 尝试以独占模式创建锁文件
fd = os.open(self.lock_file, os.O_CREAT | os.O_EXCL | os.O_RDWR)
os.close(fd)
Expand Down