Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions reappear when macvim writes to a file #897

Open
StevenCSimmons opened this issue May 31, 2019 · 1 comment
Open

Extensions reappear when macvim writes to a file #897

StevenCSimmons opened this issue May 31, 2019 · 1 comment

Comments

@StevenCSimmons
Copy link

Describe the bug:

If you have a file for which extensions normally appear in Finder, if you have disabled the showing of the extension on that file, the extension will re-appear when vim writes the file. Reproduced with both gui and non-gui versions of latest release of macvim. This does not occur with /usr/bin/vim.

To reproduce:

Create a file with an extension that is visible on the desktop, eg, foo.wiki. Select the file in finder, and use %-i to show the file information. In the file information box, select 'Hide extension'. The extension will disappear from the desktop name for the file.

Use macvim to open the file. On the first write to the file, the extension '.wiki' will reappear.

If you examine the file in a terminal window with 'ls -l@ filename.extension', prior to the write it will have the extended data
com.apple.FinderInfo 32
After the write this setting no longer appears. Same behavior with both the gui and non-gui usage of macvim.

Do the same test using Apple default /usr/bin/vim rather than mvim, and the extension visibility does not change.

Expected behavior:

The status of Finder's display the extension should not change when macvim writes the file.

Screenshots: none

Environment:

VIM version: VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 18 2019 23:51:40)
OS: macOS Mojave version10.14.5, patched to current
Terminal: iTerm, OSX Terminal app

Additional context:

I checked the gitub sites for both stock vim and macvim. There seems to be no issues (open or closed) which seemed relevant. Given that Apple's version is 8.0 rather than 8.1, it is possible that the bug was introduced after the 8.0 patchlevel 1283 release or that Apple fixed the bug but did not publish the fix.

Given that stock Apple vim works correctly, I chose to report this as a bug rather than a feature request to preserve the macOS extended attribute keys. The latter is actually a broader issue than what I report here, but it seems to me that if a file has extended attributes or security settings, those ought to be preserved as well as the simple extension visibility attribute. Similarly, one could argue that extended security information and file attributes should be applied to the .swp file as well. If you like, I'd be happy to open a feature request on that topic as well.

@eirnym
Copy link
Contributor

eirnym commented May 31, 2019

Thank you for the report and investigation

Please, report this to https://github.com/vim/vim as MacVim adds only GUI window and basic macOS integration to Vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants