Skip to content

Commit 411f757

Browse files
jemoreiraDatabean
authored andcommitted
Use fetch.log's absolute path when symlinking
Some versions of assemble_cvd don't set the images_dir property in the config file. Without that, fetch.log is sometimes found at ./fetch.log, but the symbolinc link is created elsewhere, so the absolute path must be used. Bug: b/460022351
1 parent 4f02e03 commit 411f757

File tree

1 file changed

+2
-1
lines changed
  • base/cvd/cuttlefish/host/commands/start

1 file changed

+2
-1
lines changed

base/cvd/cuttlefish/host/commands/start/main.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ Result<void> LinkLogs2InstanceDir(
194194
fmt::format("{}/{}", android::base::Dirname(images_dir), "fetch.log");
195195
}
196196
if (FileExists(fetch_log)) {
197-
CF_EXPECT(Symlink(fetch_log, instance.PerInstanceLogPath("fetch.log")));
197+
CF_EXPECT(Symlink(AbsolutePath(fetch_log),
198+
instance.PerInstanceLogPath("fetch.log")));
198199
}
199200

200201
return {};

0 commit comments

Comments
 (0)