Skip to content

Commit

Permalink
fix: resolve symlinks when computing relative asar paths for integrity (
Browse files Browse the repository at this point in the history
#34779)

Co-authored-by: Samuel Attard <sattard@salesforce.com>
  • Loading branch information
trop[bot] and MarshallOfSound committed Jun 29, 2022
1 parent fa1382d commit 3e18fba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shell/common/asar/archive_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <iomanip>
#include <string>

#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/foundation_util.h"
Expand All @@ -21,7 +22,8 @@
namespace asar {

absl::optional<base::FilePath> Archive::RelativePath() const {
base::FilePath bundle_path = base::mac::MainBundlePath().Append("Contents");
base::FilePath bundle_path = base::MakeAbsoluteFilePath(
base::mac::MainBundlePath().Append("Contents"));

base::FilePath relative_path;
if (!bundle_path.AppendRelativePath(path_, &relative_path))
Expand Down

0 comments on commit 3e18fba

Please sign in to comment.