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

:AttachFile doesn't correctly handle filenames containing blank spaces #2

Closed
daaugusto opened this issue Jun 16, 2012 · 3 comments
Closed

Comments

@daaugusto
Copy link

Dear Christian Brabandt,

First of all, thank you for developing such a useful Vim plugin!

I would like to contribute a little bit by reporting a bug I have encountered.
The issue occurs when I attach a file with spaces in its name via :AttachFile.
Suppose I have the following file in /tmp:

   /tmp/file with space.txt

Typing 

   :AttachFile /tmp/file<tab>

results in

   :AttachFile /tmp/file\ with\ space.txt

Then, when I press <enter>, CheckAttach adds the following malformed pseudo
headers

   Attach: space.txt
   Attach: with\\
   Attach: /tmp/file\\

instead of just adding

   Attach: /tmp/file\ with\ space.txt

Out of curiosity, the plugin behaves correctly if I type

   :AttachFile /tmp/file*<enter>

(without trying tab completion)

I'm using CheckAttach-0.13 (download from www.vim.org).

Thank you.


Best regards,

-- 
Douglas A. Augusto
@daaugusto
Copy link
Author

I forgot to say I'm using Vim version 7.3.547.

@chrisbra
Copy link
Owner

Thanks for your feedback. Fixed and uploaded a new version to vim.org

chrisbra added a commit that referenced this issue Jun 16, 2012
:AttachFile did not correctly handle filenames with spaces.
Use glob() to attach the files, take care of Vim patch 7.3.465
@daaugusto
Copy link
Author

It is working now. Thank you very much.

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