feat(ui): complete Avalonia UI port with 7 main pages, tool settings & top MenuBar
This commit is contained in:
@@ -377,11 +377,10 @@ public sealed class BackupService
|
||||
var root = Path.GetFullPath(targetDir);
|
||||
var full = Path.GetFullPath(Path.Combine(root, relative));
|
||||
|
||||
var rootWithSeparator = root.EndsWith(Path.DirectorySeparatorChar)
|
||||
? root
|
||||
: root + Path.DirectorySeparatorChar;
|
||||
|
||||
if (!full.StartsWith(rootWithSeparator, StringComparison.OrdinalIgnoreCase))
|
||||
// Der Vergleich muss dem Dateisystem folgen: Unter Linux sind "Ziel" und "ziel"
|
||||
// zwei Verzeichnisse, und ein Eintrag darf auch nicht über eine symbolische
|
||||
// Verknüpfung hinauszeigen. Beides steckt in PathBoundary.
|
||||
if (!PathBoundary.IsInside(full, root))
|
||||
throw new BackupException($"Eintrag '{relative}' zeigt aus dem Zielverzeichnis heraus.");
|
||||
|
||||
return full;
|
||||
|
||||
Reference in New Issue
Block a user