FS#57715 - [vim] vim creates directories in the current working directory

Attached to Project: Arch Linux
Opened by Neven Sajko (Neven) - Sunday, 04 March 2018, 18:21 GMT
Last edited by Levente Polyak (anthraxx) - Wednesday, 09 May 2018, 22:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
In the current directory vim when run creates the directories ~, ~/.vim, and ~/.vim/swap.

The problem could be caused by using the contents of the SHELL environment variable instead of "/bin/sh" (The former is an interactive user shell, the latter for scripts and must conform to POSIX.).

Additional info:
* vim 8.0.1542-2, but may have regressed before that?

Steps to reproduce:
Run vim, list directory
This task depends upon

Closed by  Levente Polyak (anthraxx)
Wednesday, 09 May 2018, 22:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  8.0.1806-1
Comment by Doug Newgard (Scimmia) - Monday, 05 March 2018, 15:12 GMT
So you're using a shell that doesn't expand "~"? Where is this call that you're complaining about?
Comment by Neven Sajko (Neven) - Monday, 05 March 2018, 17:39 GMT
Yeah, the shell is rc, from the plan9port package, if somebody is curious.

I guess the bug is upstream, but changing the occurences of '~' in archlinux.vim to '$HOME' seems to be a good workaround.
Comment by Eli Schwartz (eschwartz) - Monday, 05 March 2018, 18:14 GMT
Or use expand() or fnamemodify() before calling system().

Or do as  FS#57682  suggested and use mkdir(expand('~/.vim/swap'), 'p', 0700) since why shell out to do this at all.

Loading...