projects
/
arvados-workbench2.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b527533
)
15685: Adds empty dir name validation to rename file dialog.
author
Lucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 11 Nov 2020 21:25:45 +0000
(18:25 -0300)
committer
Lucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 11 Nov 2020 21:25:45 +0000
(18:25 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>
src/validators/valid-name.tsx
patch
|
blob
|
history
diff --git
a/src/validators/valid-name.tsx
b/src/validators/valid-name.tsx
index 000e27b004b6aa9922eff5de1d6f74d460dc1657..c3650542714b371348112e6bdc9f15b56eb4b15f 100644
(file)
--- a/
src/validators/valid-name.tsx
+++ b/
src/validators/valid-name.tsx
@@
-29,6
+29,9
@@
export const validFileName = (value: string) => {
};
export const validFilePath = (filePath: string) => {
- const errors = filePath.split('/').map(pathPart => validFileName(pathPart));
+ const errors = filePath.split('/').map(pathPart => {
+ if (pathPart === "") { return "Empty dir name not allowed"; }
+ return validFileName(pathPart);
+ });
return errors.filter(e => e !== undefined)[0];
};
\ No newline at end of file