NativeIO: Block filenames longer that 100 characters
This fixes a bug where maximum filename length would be
installation-path and host configuration dependent. The proposed limit
is enough for existing partner and test cases. Depending on developer
feedback we might provide a Javascript-based solution as shown in this
document:
https://docs.google.com/document/d/1gjnHg9b0vuTul54MHAzRFfQ6T1XKdayYoGKs6Td8yuQ/edit?ts=5fc7a3ee&pli=1
Bug: 914488
Change-Id: I0b21d2144aee69b6cb82338365a3d6d419e2ca04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2712793
Commit-Queue: Emanuel Krivoy <krivoy@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857408}
diff --git a/native-io/resources/support.js b/native-io/resources/support.js
index 6a36f9f..69d5fc8 100644
--- a/native-io/resources/support.js
+++ b/native-io/resources/support.js
@@ -1,9 +1,10 @@
// Names disallowed by NativeIO
const kBadNativeIoNames = [
- "Uppercase",
- "has-dash",
- "has.dot",
- "has/slash",
+ 'Uppercase',
+ 'has-dash',
+ 'has.dot',
+ 'has/slash',
+ 'x'.repeat(101),
];
// Returns a handle to a newly created file that holds some data.