diff --git a/.env b/.env index ae0de51..4b5af24 100644 --- a/.env +++ b/.env @@ -74,9 +74,9 @@ export MICROBIN_HIGHLIGHTSYNTAX=true export MICROBIN_PORT=8080 # Sets the bind address for the server will be listening on. -# Both ipv4 and ipv6 are supported. Default value: 0.0.0.0. +# Both ipv4 and ipv6 are supported. Default value: "0.0.0.0". # Example value: "myserver.net", "127.0.0.1". -export MICROBIN_BIND=0.0.0.0 +export MICROBIN_BIND="0.0.0.0" # Enables private pastas. Adds a new checkbox to make your # pasta private, which then won't show up on the pastalist @@ -151,7 +151,7 @@ export MICROBIN_DEFAULT_BURN_AFTER=0 export MICROBIN_WIDE=false # Enables generating QR codes for pastas. Requires -# --public-path to be set. +# the public path to also be set. # Default value: false export MICROBIN_QR=true diff --git a/src/args.rs b/src/args.rs index 374bd06..8a7c733 100644 --- a/src/args.rs +++ b/src/args.rs @@ -142,8 +142,10 @@ impl Args { } pub fn short_path_as_str(&self) -> String { - if self.public_path.is_some() { + if self.short_path.is_some() { self.short_path.as_ref().unwrap().to_string() + } else if self.public_path.is_some() { + self.public_path.as_ref().unwrap().to_string() } else { String::from("") }