Fix symlink resolution when mounting
fixes #1722
Symbolic links are now resolved when performing a mount. Previously they were not resolved.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.88%. Comparing base (
21430a3) to head (e4d1ea0). Report is 14 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3673 +/- ##
=======================================
Coverage 88.87% 88.88%
=======================================
Files 256 256
Lines 14579 14581 +2
=======================================
+ Hits 12957 12960 +3
+ Misses 1622 1621 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey Trevor, a quick experiment I did:
#include <filesystem>
#include <iostream>
using namespace std;
namespace fs = std::filesystem;
int main()
{
// l4 -> ..
// l2 -> ../subl-mdpreview
auto src_path = "/home/ricab/tmp/asdf/l4/asdf/l4/asdf/l2/";
error_code ec{};
auto dst_path = fs::weakly_canonical(src_path, ec);
if (!ec)
cout << "\"" << src_path << "\" == " << dst_path << endl;
// prints "/home/ricab/tmp/asdf/l4/asdf/l4/asdf/l2/" == "/home/ricab/tmp/subl-mdpreview"
return bool(ec);
}
I wonder if we should check elsewhere in the repo for usage of \"{}\" since a string like Hello\\ could cause issues (becomes "Hello\"). WDYT?
I wonder if we should check elsewhere in the repo for usage of "{}" since a string like Hello\ could cause issues (becomes "Hello"). WDYT?
We ended up considering this moot, correct @Sploder12 ?
We ended up considering this moot, correct @Sploder12 ?
There was one issue that came from it https://github.com/canonical/multipass/issues/3759, but no real impact.
OK, all builds but windows succeeded in the merge queue: https://github.com/canonical/multipass-private/actions/runs/12067865806/job/33655393234
The private side is necessary for windows, so merging manually.