macvim-dev / macvim-dev/macvim

Extensions reappear when macvim writes to a file

オープン
#897 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Vim Script
スター
7.9k
フォーク
691
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、macOS 上で MacVim を使って書き込みを再現し、報告されている拡張属性 com.apple.FinderInfo を観測可能な差分として、/usr/bin/vim と比較します。その属性が失われる原因となっているファイル書き込み経路を追跡します。MacVim がファイルを書き込んだ後も Finder の拡張子を隠す設定が変わらなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
macos, vim
領域
desktop, operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。