Skip to content

The tilde (~) comparison will not match the actual home directory path. The shell expands ~ to the full home directory path before the comparison, so this check will never match a user's home directory. Use "$TARGET_DIR" == "$HOME" to properly check for the home directory."$TARGET_DIR" == "$HOME"  #19

@joe10832

Description

@joe10832

The tilde (~) comparison will not match the actual home directory path. The shell expands ~ to the full home directory path before the comparison, so this check will never match a user's home directory. Use "$TARGET_DIR" == "$HOME" to properly check for the home directory.

        if [[ -z "$TARGET_DIR" || "$TARGET_DIR" == "/" || "$TARGET_DIR" == "~" || "$TARGET_DIR" == "$HOME" || "$TARGET_DIR" == "." || "$TARGET_DIR" == ".." ]]; then

Originally posted by @copilot-pull-request-reviewer in https://github.com/MunyayLLC/shadowsocks-android/pull/18#discussion_r2374844852

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions