Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions .github/workflows/codeql.yml

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions uSync.Backoffice.Management.Client/usync-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,8 @@
"typescript": "^5.9.3",
"vite": "^8.2.1",
"vite-plugin-dts": "^5.0.3"
},
"overrides": {
"js-yaml": "^4.3.1"
}
}
16 changes: 12 additions & 4 deletions uSync.Core/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@ public static class StringExtensions
/// <summary>
/// convert a file name to one that isn't going to cause us any downlevel problems.
/// </summary>
/// <remarks>
/// paths aren't always parsed on the OS they came from (e.g. a Windows-style path
/// loaded on Linux), so we split on both separators here rather than using
/// Path.GetFileName/GetDirectoryName, which only recognise the current OS's separator.
/// </remarks>
public static string ToAppSafeFileName(this string value)
{
var filename = Path.GetFileName(value);
var separatorIndex = value.LastIndexOfAny(['\\', '/']);
var directory = separatorIndex >= 0 ? value[..(separatorIndex + 1)] : string.Empty;
var filename = separatorIndex >= 0 ? value[(separatorIndex + 1)..] : value;

if (_badNames.InvariantContains(filename))
{
return Path.Combine(
Path.GetDirectoryName(value) ?? string.Empty,
$"__{Path.GetFileNameWithoutExtension(value)}__{Path.GetExtension(value)}");
var extension = Path.GetExtension(filename);
var nameWithoutExtension = filename[..^extension.Length];
return $"{directory}__{nameWithoutExtension}__{extension}";
}
return value;
}
Expand Down
6 changes: 3 additions & 3 deletions uSync.History/history-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions uSync.History/history-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
"prettier": "^3.9.6",
"typescript": "^6.0.3",
"vite": "^8.2.1"
},
"overrides": {
"js-yaml": "^4.3.1"
}
}
Loading