From 5365f8b342c44fd81bca70fed86562eae7048ee6 Mon Sep 17 00:00:00 2001 From: tiehu <52388789+tiehu@users.noreply.github.com> Date: Sat, 13 Jun 2026 12:50:12 +0800 Subject: [PATCH] fix: restore failure issue --- .../java/net/pcal/fastback/common/repo/RestoreUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/net/pcal/fastback/common/repo/RestoreUtils.java b/common/src/main/java/net/pcal/fastback/common/repo/RestoreUtils.java index b31e2809..edd0ff5c 100644 --- a/common/src/main/java/net/pcal/fastback/common/repo/RestoreUtils.java +++ b/common/src/main/java/net/pcal/fastback/common/repo/RestoreUtils.java @@ -59,7 +59,7 @@ abstract class RestoreUtils { // Package private static void doRestoreLocalSnapshot(final String snapshotNameToRestore, final RepoImpl repo, final UserLogger ulog) { - doRestoreSnapshot(snapshotNameToRestore, "file://" + mod().getWorldDirectory().toAbsolutePath(), repo, ulog); + doRestoreSnapshot(snapshotNameToRestore, mod().getWorldDirectory().toAbsolutePath().toUri().toString(), repo, ulog); } static void doRestoreRemoteSnapshot(final String snapshotNameToRestore, final RepoImpl repo, final UserLogger ulog) { @@ -106,6 +106,10 @@ private static void native_restoreSnapshot(final String branchName, final Path r ProcessUtils.doExec(new String[]{ "git", "-C", restoreTargetDirStr, "lfs", "install", "--local" }, env, outputConsumer, outputConsumer); + syslog().debug("Fetching lfs objects from local repo " + repoUri); + ProcessUtils.doExec(new String[]{ + "git", "-C", restoreTargetDirStr, "lfs", "fetch", "--all", repoUri + }, env, outputConsumer, outputConsumer); syslog().debug("Checking out " + branchName + ", downloading lfs blobs"); ProcessUtils.doExec(new String[]{ "git", "-C", restoreTargetDirStr, "checkout", branchName