File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
base/src/com/google/idea/blaze/base/sync/workspace Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2016 The Bazel Authors. All rights reserved.
2+ * Copyright 2025 The Bazel Authors. All rights reserved.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2525import com .intellij .openapi .util .io .FileUtil ;
2626import java .io .File ;
2727import java .io .IOException ;
28+ import java .nio .file .Files ;
2829import java .nio .file .Path ;
2930import java .nio .file .Paths ;
3031import java .util .Objects ;
@@ -93,6 +94,11 @@ public File decode(ArtifactLocation artifactLocation) {
9394 private @ Nullable File tryToResolveExternalArtifactToMainWorkspace (ArtifactLocation artifactLocation ) {
9495 if (artifactLocation .isExternal ()) {
9596 try {
97+ Path estimatedLocation = blazeInfo .getExecutionRoot ().toPath ().resolve (artifactLocation .getExecutionRootRelativePath ());
98+ if (!Files .exists (estimatedLocation )) {
99+ return null ;
100+ }
101+
96102 File realFile = blazeInfo .getExecutionRoot ().toPath ()
97103 .resolve (artifactLocation .getExecutionRootRelativePath ()).toRealPath ().toFile ();
98104 if (pathResolver .getWorkspacePath (realFile ) != null ) {
You can’t perform that action at this time.
0 commit comments