-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Adding path validation #391
Conversation
Doing 2 checks: - Check if we have an absolute path - Check if the file exists Requires 'pathname' gem
@jordansissel please double/triple check this ;-) |
return false, "Expected path (one value), got #{value.size} values?" | ||
end | ||
|
||
unless (Pathname.new value.first).absolute? # We want an absolute path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any strong reason to require an absolute path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured to keep everything the same ( file input requires a full path )
woo! Next steps:
|
Doing 2 checks:
Requires 'pathname' gem