A push now moves the base before its local file reads as sent; a replay journals itself in sync.json, writes the replayed versions, then the base (the commit point), and only then sets the old ones aside and adopts the local commits the home already held; a conflict met past such commits moves the base onto them first. A save-both journals its copy and the ids it sends under, so a retry completes the same copy instead of making another. The next push, pull or resolve finishes or undoes whatever a cut left, so no version is orphaned and no false conflict appears. The editor reads the working state and the media index under the project lease; workspace.json is written whole and moved into place (an empty one is made again); project files may hold 64 MiB and one that would be larger is refused before it is written, so large projects check out. The workspace copy checks the drive's free space before and during the copy, keeps the folder in its checkpoint and stores a reset when a pass starts again, and runs at High level in the priority queue. Renders record a version only when the index holds it with the settings rendered; an unsent version renders as the project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.5 KiB
C#
30 lines
1.5 KiB
C#
using Chronos.App.Infrastructure;
|
|
using Chronos.Core.Archiving;
|
|
using Chronos.Core.Localization;
|
|
using Chronos.Data;
|
|
using Chronos.Data.Archiving;
|
|
|
|
namespace Chronos.App.Archiving;
|
|
|
|
/// <summary>
|
|
/// Why an Archive screen action stopped, as one localized sentence chosen by cause (BRIEF §0.2 rule 6). The
|
|
/// exception's own text, which may be technical or unlocalized, goes to the tooltip and the log only.
|
|
/// </summary>
|
|
public static class ArchiveFailures
|
|
{
|
|
public static string Cause(Exception ex) => ex switch
|
|
{
|
|
ArchiveOfflineException offline => Loc.L(offline.Availability == ArchiveAvailability.ReadOnly ? "Archive.Error.ReadOnly" : "Archive.Error.Offline",
|
|
Formatting.LeftToRight(offline.Root)),
|
|
// Already one localized sentence each; TrashMismatchException is a trash entry none of whose files matches its record
|
|
// any more (FrameTrash.RestoreAsync). Other IOExceptions and InvalidDataExceptions (a sidecar of another sequence)
|
|
// carry technical text.
|
|
LeaseUnavailableException or NewerFormatException or StaleRenamePlanException or NestedRenameException or StaleDeletePlanException
|
|
or SequenceInLibraryException or TrashMismatchException or Core.Project.ProjectTooLargeException => ex.Message,
|
|
UnauthorizedAccessException => Loc.L("Archive.Failed.Access"),
|
|
DatabaseException => Loc.L("Archive.Failed.Index"),
|
|
ArgumentException => Loc.L("Archive.Failed.Gone"),
|
|
_ => Loc.L("Archive.Failed.Files"),
|
|
};
|
|
}
|