mirror of
https://github.com/NixOS/nix.git
synced 2025-12-16 14:01:05 +01:00
Fix handling of relative paths
In particular, 'path:..' got turned into 'path:.' because isRelative() returned a CanonPath, which cannot represent '..'. Reported by @erikarvstedt.
This commit is contained in:
parent
7317196807
commit
511590976c
5 changed files with 7 additions and 6 deletions
|
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
/* Only for relative path flakes, i.e. 'path:./foo', returns the
|
||||
relative path, i.e. './foo'. */
|
||||
std::optional<CanonPath> isRelative() const;
|
||||
std::optional<std::string> isRelative() const;
|
||||
|
||||
bool operator ==(const Input & other) const;
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ struct InputScheme
|
|||
virtual bool isLocked(const Input & input) const
|
||||
{ return false; }
|
||||
|
||||
virtual std::optional<CanonPath> isRelative(const Input & input) const
|
||||
virtual std::optional<std::string> isRelative(const Input & input) const
|
||||
{ return std::nullopt; }
|
||||
|
||||
virtual std::optional<std::string> getFingerprint(ref<Store> store, const Input & input) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue