Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 276 by santosh....@gmail.com: opening file with .gz extension
https://code.google.com/p/vim/issues/detail?id=276
The default behaviour of vim when opening a file with ".gz" extension, is
to decompress and then re-compress it again when saving it. In a situation
when the file has a ".gz" extension, BUT IT IS NOT GZIPPED, vim gives
error in the first part of decompression. But the 2nd part of
re-compression goes ahead as it is, which has an unwanted side-effect that
the original file gets compressed. Although not a bug, it would be better
if the behaviour was more consistent and vim didn't try to re-compress the
file if it was not able to decompress it originally.
What steps will reproduce the problem?
1. Create a file txt-file (no compression) with ".gz" extension
$ echo -e "one\ntwo" > vimtmp.gz
2. open the file with vim, it spits the following error msg:
--
"vimtmp.gz" 2L, 8C
Error detected while processing function gzip#read:
line 44:
Error: Could not read uncompressed file
Press ENTER or type command to continue
--
Press ENTER and continue to open the file.
3. Save the file using ":wq"
Here, vim doesn't give any warning or error and compresses the file using
gzip.
What is the expected output? What do you see instead?
No compression of the original file, if vim encountered an error in
decompression.
What version of the product are you using? On what operating system?
version 7.2.108 on Mac OS X (10.6.8)
version 7.3.49 on Ubuntu 12-04.4 LTS
Please provide any additional information below.
It seems to be more generic issue related to how vim "gzip" plugin
handles ".gz" file, and can be potentially affecting all versions (on all
OSes)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.