Repository navigation
Conversation
Owner
|
Could you please elaborate on what exact problem you are solving with this change? It would also be good if you include some example paths. |
Author
|
Hey. I described the problem it solves in the linked issue. An example path is |
| }; | ||
| let scripts_src_dir = match scripts_src_dir.canonicalize() { | ||
| Ok(scripts_src_dir) => scripts_src_dir, | ||
| Err(err) => return GString::from(&format!("Unable to validate script location! {}", err.to_string())), |
| let path_obj = PathBuf::from(ProjectSettings::singleton().globalize_path(&path).to_string()); | ||
| let path_obj = match path_obj.canonicalize() { | ||
| Ok(path_obj) => path_obj, | ||
| Err(err) => return GString::from(&format!("Unable to validate script location! {}", err.to_string())), |
TitanNano
reviewed
Oct 18, 2026
Comment on lines
+20
to
+21
| use std::ffi::{OsStr, c_void}; | ||
| use std::path::PathBuf; |
Owner
There was a problem hiding this comment.
Please keep std imports in the first block, separated from external imports by a blank line.
| let Some(scripts_src_dir) = self | ||
| .scripts_src_dir | ||
| .map(|path| ProjectSettings::singleton().localize_path(path)) | ||
| .map(|path| PathBuf::from(path.to_string())) |
Owner
There was a problem hiding this comment.
Suggested change
| .map(|path| PathBuf::from(path.to_string())) | |
| .map(Path::new) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following up on #100, this change makes the checks of scripts paths more robust against false negatives, especially allowing symlinks.