| 49 | unsigned long wsLastCompleteAt = 0; |
| 50 | |
| 51 | String normalizeWebPath(const String& inputPath) { |
| 52 | if (inputPath.isEmpty() || inputPath == "/") { |
| 53 | return "/"; |
| 54 | } |
| 55 | std::string normalized = FsHelpers::normalisePath(inputPath.c_str()); |
| 56 | String result = normalized.c_str(); |
| 57 | if (result.isEmpty()) { |
| 58 | return "/"; |
| 59 | } |
| 60 | if (!result.startsWith("/")) { |
| 61 | result = "/" + result; |
| 62 | } |
| 63 | if (result.length() > 1 && result.endsWith("/")) { |
| 64 | result = result.substring(0, result.length() - 1); |
| 65 | } |
| 66 | return result; |
| 67 | } |
| 68 | |
| 69 | bool isProtectedItemName(const String& name) { |
| 70 | if (name.startsWith(".")) { |
no test coverage detected