Expand integration coverage and fix settings UI
This commit is contained in:
1 parent
25088ce91d
commit
094d5ad9f0
26 files changed
+1665
-66
No files matched your search
@@ -163,13 +163,13 @@ DELETE FROM assets WHERE item_id = $item_id;";
|
||||
public bool TryNormalizeLocalAssetPath(string path, out string fullPath)
|
||||
{
|
||||
fullPath = string.Empty;
|
||||
if (string.IsNullOrWhiteSpace(path) || Uri.TryCreate(path, UriKind.Absolute, out _))
|
||||
if (string.IsNullOrWhiteSpace(path))
|
||||
return false;
|
||||
|
||||
var relative = path;
|
||||
if (relative.StartsWith(LocalAssetUrlPrefix, StringComparison.OrdinalIgnoreCase))
|
||||
relative = relative[LocalAssetUrlPrefix.Length..];
|
||||
else if (Path.IsPathRooted(relative))
|
||||
else if (Uri.TryCreate(relative, UriKind.Absolute, out _) || Path.IsPathRooted(relative))
|
||||
return false;
|
||||
|
||||
var candidate = Path.GetFullPath(Path.Combine(_assetsDir, relative));
|
||||
|
||||
Reference in new issue
Block a user