cleanup asset file regex, comment in renameMapping

This commit is contained in:
Stephen Birarda 2016-10-19 11:47:57 -07:00
parent b80f3fbd7b
commit eb8f67b612
2 changed files with 2 additions and 2 deletions

View file

@ -638,7 +638,7 @@ bool AssetServer::renameMapping(AssetPath oldPath, AssetPath newPath) {
newPath = newPath.trimmed();
if (!isValidFilePath(oldPath) || !isValidFilePath(newPath)) {
qWarning() << "Cannot perform rename with invalid paths - both should have leading forward slashes:"
qWarning() << "Cannot perform rename with invalid paths - both should have leading forward and no ending slashes:"
<< oldPath << "=>" << newPath;
return false;

View file

@ -31,7 +31,7 @@ const size_t SHA256_HASH_LENGTH = 32;
const size_t SHA256_HASH_HEX_LENGTH = 64;
const uint64_t MAX_UPLOAD_SIZE = 1000 * 1000 * 1000; // 1GB
const QString ASSET_FILE_PATH_REGEX_STRING = "^\\/([^\\/\\0]+(\\/)?)*([^\\/\\0]+)$";
const QString ASSET_FILE_PATH_REGEX_STRING = "^(\\/[^\\/\\0]+)+$";
const QString ASSET_PATH_REGEX_STRING = "^\\/([^\\/\\0]+(\\/)?)+$";
const QString ASSET_HASH_REGEX_STRING = QString("^[a-fA-F0-9]{%1}$").arg(SHA256_HASH_HEX_LENGTH);