🧚 A practical web framework for Gleam

Use `./tmp` instead of `./gleam-wisp/` as a fallback tmp directory

authored by DitherWither and committed by Louis Pilfold 7ee54cc7 9d7635a8

Changed files
+4 -2
src
+4 -2
src/wisp/internal.gleam
··· 1 import directories 2 import gleam/bit_array 3 import gleam/crypto 4 - import gleam/result 5 import gleam/string 6 7 // HELPERS ··· 31 secret_key_base: String, 32 ) -> Connection { 33 // Fallback to current working directory when no valid tmp directory exists 34 - let prefix = result.unwrap(directories.tmp_dir(), ".") <> "/gleam-wisp/" 35 let temporary_directory = join_path(prefix, random_slug()) 36 Connection( 37 reader: body_reader,
··· 1 import directories 2 import gleam/bit_array 3 import gleam/crypto 4 import gleam/string 5 6 // HELPERS ··· 30 secret_key_base: String, 31 ) -> Connection { 32 // Fallback to current working directory when no valid tmp directory exists 33 + let prefix = case directories.tmp_dir() { 34 + Ok(tmp_dir) -> tmp_dir <> "/gleam-wisp/" 35 + Error(_) -> "./tmp/" 36 + } 37 let temporary_directory = join_path(prefix, random_slug()) 38 Connection( 39 reader: body_reader,