fix: resolve symlinks when computing relative asar paths for integrity (#34776)
This commit is contained in:
parent
07294cbf15
commit
44b9ee51f4
1 changed files with 3 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "base/files/file_util.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/mac/bundle_locations.h"
|
#include "base/mac/bundle_locations.h"
|
||||||
#include "base/mac/foundation_util.h"
|
#include "base/mac/foundation_util.h"
|
||||||
|
@ -21,7 +22,8 @@
|
||||||
namespace asar {
|
namespace asar {
|
||||||
|
|
||||||
absl::optional<base::FilePath> Archive::RelativePath() const {
|
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;
|
base::FilePath relative_path;
|
||||||
if (!bundle_path.AppendRelativePath(path_, &relative_path))
|
if (!bundle_path.AppendRelativePath(path_, &relative_path))
|
||||||
|
|
Loading…
Reference in a new issue