X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b527533a2d7ffa52b3f999f0ed293b83311fe59f..31e84a9315728c2f58a26bf0e9e1d2b38326fb86:/src/validators/valid-name.tsx

diff --git a/src/validators/valid-name.tsx b/src/validators/valid-name.tsx
index 000e27b0..89bb3f96 100644
--- 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 validNameAllowSlash(pathPart) || validFileName(pathPart);
+    });
     return errors.filter(e => e !== undefined)[0];
 };
\ No newline at end of file
