diff --git a/modules/firefox-profile/functions/fhp b/modules/firefox-profile/functions/fhp index 192809c2..8ba3cd21 100644 --- a/modules/firefox-profile/functions/fhp +++ b/modules/firefox-profile/functions/fhp @@ -24,10 +24,13 @@ local ext=.tar.$compressor[(w)1] pushd -q "$HOME"/.mozilla/firefox || return if [[ -f $profile/.unpacked ]] { - mv -f $profile{,.old}$ext - if (( $? )) { - die "failed to override the old tarball" - return + if [[ -f $profile$ext ]] { + mv -f $profile{,.old}$ext + if (( $? )) { + die "failed to override the old tarball" + popd -q + return + } } tar -X $profile/.unpacked -Ocp $profile | $=compressor $profile$ext diff --git a/modules/firefox-profile/init.zsh b/modules/firefox-profile/init.zsh index f760fb70..70e4df01 100644 --- a/modules/firefox-profile/init.zsh +++ b/modules/firefox-profile/init.zsh @@ -15,7 +15,6 @@ function die { } setopt EXTENDED_GLOB -setopt NULL_GLOB zstyle -s ':prezto:module:firefox-profile' profile 'profile' zstyle -s ':prezto:module:firefox-profile' compressor 'compressor' @@ -27,7 +26,7 @@ if [[ -z "$compressor" ]] { zstyle ':prezto:module:firefox-profile' compressor "$compressor" } -: ${profile:=${$(print $HOME/.mozilla/firefox/*.default(/)):t}} +: ${profile:=${$(print $HOME/.mozilla/firefox/*.default(/N)):t}} if [[ -z $profile ]] { unset compressor profile zramdir zsh_hook die "null firefox home profile"