Check illegal characters from the file and parent folder name

PiperOrigin-RevId: 634598623
This commit is contained in:
Eiden Kim
2024-05-16 18:54:45 -07:00
committed by Copybara-Service
parent 5cddd51876
commit 33d66fd169
5 changed files with 144 additions and 72 deletions
@@ -28,7 +28,8 @@ namespace parser {
constexpr absl::string_view kIllegalFileNamePatterns[] = {":", "/", "\\"};
constexpr absl::string_view kIllegalParentFolderPatterns[] = {":", ".."};
constexpr absl::string_view kIllegalParentFolderPatterns[] = {":", "../",
"..\\"};
const size_t kIllegalFileNamePatternsSize =
sizeof(kIllegalFileNamePatterns) / sizeof(*kIllegalFileNamePatterns);