Skip to content

Conversation

@reigadegr
Copy link
Contributor

/sdcard/Android/fas-rs目录有时候玄学消失,增加一点健壮性

In some edge cases, the $DIR (/sdcard/Android/fas-rs) may be removed after boot, causing the script to hang indefinitely. This patch adds a wait_until_login function to ensure proper timing and proactively recreates the directory and copies games.toml if it goes missing.

  • Add wait_until_login to handle early boot timing issues
  • Ensure $DIR exists by creating it and copying games.toml
  • Prevent infinite loop when directory is absent

In some edge cases, the $DIR (/sdcard/Android/fas-rs) may be removed
after boot, causing the script to hang indefinitely. This patch adds
a wait_until_login function to ensure proper timing and proactively
recreates the directory and copies games.toml if it goes missing.

- Add wait_until_login to handle early boot timing issues
- Ensure $DIR exists by creating it and copying games.toml
- Prevent infinite loop when directory is absent
@shadow3aaa
Copy link
Owner

除非故意,否则/sdcard/Android/fas-rs不应该被删除。

until [ -d $DIR ]; do应该起到了在这里比wait_until_login更符合语义的检测吧?一旦这个配置文件夹可以被访问,当然就说明data已经可以访问了,因为sdcard也是在data下的。同时考虑到这里的目的就只是检测配置文件是否可读,而非检测login,我认为没有必要加wait_until_login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants