Merge branch 'blender-v4.5-release'

This commit is contained in:
Campbell Barton
2025-07-03 18:39:21 +10:00
2 changed files with 9 additions and 3 deletions

View File

@@ -144,7 +144,7 @@ bUserExtensionRepo *BKE_preferences_extension_repo_find_by_remote_url_prefix(
*/
int BKE_preferences_extension_repo_remote_scheme_end(const char *url);
/**
* Set a name based on a URL, e.g. `https://www.example.com/path` -> `www.example.com`.
* Set a name based on a URL, e.g. `https://www.example.com/path` -> `example.com`.
*/
void BKE_preferences_extension_remote_to_name(const char *remote_url, char name[64]);

View File

@@ -467,8 +467,8 @@ void BKE_preferences_extension_remote_to_name(const char *remote_url,
/* Skip the `://`. */
remote_url += (offset + 3);
if (is_win32) {
if (is_file) {
if (is_file) {
if (is_win32) {
/* Skip the slash prefix for: `/C:/`,
* not *required* but seems like a bug if it's not done. */
if (remote_url[0] == '/' && isalpha(remote_url[1]) && (remote_url[2] == ':')) {
@@ -476,6 +476,12 @@ void BKE_preferences_extension_remote_to_name(const char *remote_url,
}
}
}
else {
/* Skip the `www` as it's not useful information. */
if (BLI_str_startswith(remote_url, "www.")) {
remote_url += 4;
}
}
}
if (UNLIKELY(remote_url[0] == '\0')) {
return;