Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a bug in /build.sh #1041

Merged
merged 1 commit into from
Aug 21, 2023
Merged

fix a bug in /build.sh #1041

merged 1 commit into from
Aug 21, 2023

Conversation

youcancharm
Copy link
Contributor

If the value of $CurrentDir contains whitespaces, $file in for loop could get non-existing file paths, which in turn fails the building process.

This commit fixes that bug by discarding the entire for loop and running solely the find command with the gzip commanded in the -exec clause after file paths filtered by -name and -type predicates.

… could get non-existing file paths, which in turn fails the building process.

This commit fixes that bug by discarding the entire `for` loop and running solely the `find` command with the `gzip` commanded in the `-exec` clause after file paths filtered by `-name` and `-type` predicates.
@mzz2017
Copy link
Collaborator

mzz2017 commented Aug 20, 2023

Good catch! Have you ever tested it?

@youcancharm
Copy link
Contributor Author

Good catch! Have you ever tested it?

Yes, I've tested the case of $CurrentDir containing whitespaces and find that bug.
Btw, there's no need to employ extra grep pipelines to filter filepaths.
A sole find command can fix that bug and get things done in a one-go.

@mzz2017 mzz2017 merged commit 8738f81 into v2rayA:feat_v5 Aug 21, 2023
Gaojianli pushed a commit that referenced this pull request Nov 3, 2023
… could get non-existing file paths, which in turn fails the building process. (#1041)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants