diff --git a/.vim/ftplugin/rust.vim b/.vim/ftplugin/rust.vim index 0f403a9..4acfef2 100644 --- a/.vim/ftplugin/rust.vim +++ b/.vim/ftplugin/rust.vim @@ -1 +1,3 @@ -nnoremap :ALEGoToDefinition +if !has('nvim') + nnoremap :ALEGoToDefinition +endif diff --git a/installer/targets.py b/installer/targets.py index 0c2da59..e4740ba 100644 --- a/installer/targets.py +++ b/installer/targets.py @@ -137,12 +137,16 @@ class WSLHost(Target): print(f"is link: {is_link}") if target_path.exists(): print("target path exists") - if target_path.is_file(): - print("removing existing regular file") - target_path.unlink() - else: - print("skip: target path exists and is not a regular file") - return + if source_path.is_file(): + if target_path.is_file(): + print("removing existing regular file") + target_path.unlink() + else: + print("skip: target path exists and is not a regular file") + return + elif source_path.is_dir(): + print("removing existing file tree") + shutil.rmtree(target_path) else: print("target path does not exist") print("copying file to target")