summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/open/options.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix/src/open/options.rs')
-rw-r--r--vendor/gix/src/open/options.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/gix/src/open/options.rs b/vendor/gix/src/open/options.rs
index b098d55c1..930fb414c 100644
--- a/vendor/gix/src/open/options.rs
+++ b/vendor/gix/src/open/options.rs
@@ -149,6 +149,12 @@ impl Options {
}
}
+impl Options {
+ pub(crate) fn current_dir_or_empty(&self) -> &std::path::Path {
+ self.current_dir.as_deref().unwrap_or(std::path::Path::new(""))
+ }
+}
+
impl gix_sec::trust::DefaultForLevel for Options {
fn default_for_level(level: gix_sec::Trust) -> Self {
match level {