-
Notifications
You must be signed in to change notification settings - Fork 46
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
Naive filesystem path concatenation #20
Comments
For
or |
If all the remaining lines use |
So basically you want to add the trailing pathname seperator whilst passing argument(alternative_location) on line 166 itself using os.path.join? Because right now. on line 166 we are not explicitly adding the seperator in the end. |
It's not about path separator in the end, it's all about concatenating file paths in robust way. |
I understand the robustness part. But according to the code , in lines 1213 and 1214 we are checking for a trailing '/' and if there isnt we are appending one. So if we remove those lines ,line 166 would look something like this: I am referring to line 166 because thats what I got when I traced back the origin of 'alternative_location'. Is it correct? |
Sorry but I don't really have time to walk you through the issue; I'm quite busy right now so I can only review the code and comment on it. For example, in
that's why everywhere else we check for |
Ok @So-Cool . Actually the line of code which I sent in the earlier comment does it all i.e. there wont be any need to explicitly check for the trailing '/' (lines 1213 and 1214) and |
Great! Before you do a PR please send me a link to you commits and I'll have a look at them. |
https://github.com/greninja/cuckooml/commits/filesystem_path_concatenation |
@greninja, linked commit does not exist. |
Comments attached to your commit. |
Any issues with the commit? @So-Cool |
Right now filesystem paths are created through string concatenation. This has to be changed to
os.path.join()
for robustness:The text was updated successfully, but these errors were encountered: