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.
Fixes #1612
This PR adds the
RelativePathInput
for relative paths. All file name inputs now use this input and get the same file path validation as folder name in Directory Go Into. This also means that all file name inputs now "officially" support relative paths. E.g.This was allowed before already, so this doesn't change existing behavior, it just makes it more explicit.
One thing that did change are absolute file paths as names. E.g. the following was allowed before and created the model
C:\foo\bar.pth
:This has now been fixed. Absolute paths are now an error.
If the user inputs invalid characters, they'll get this "error" and the character input won't go through. This makes it impossible to input invalid relative paths.
Kinda. Input validation currently only work on an input level. Users can trivially input invalid characters using a Text node. These invalid characters will cause an error at runtime, but there is no type error.
Example: I tried to type "foo*"
Other changes:
create: bool
fromDirectoryInput
. Since names are now officially relative paths, we can only know which directory to create after combining the directory and name (e.g.C:\a\b\c
and..\name
). I also changed all relevant nodes to create the directory themselves.