7-Zip fails to open .html or .htm files within .zip files (edit .html or .htm files works correctly).
I am using the most current version of 7-zip: v4.65 on 25-Feb-2010
1) I start with a small html file named: "test-7-zip-hello.htm" or "test-7-zip-hello.html"
2) The file contains only the following text ended with a newline:
<html> <head> <title>test-7-zip-hello</title> </head> <body> hello <br> </body> </html>
3) I zip it into the file: "test-7-zip-hello.zip"
4) I open the file ("test-7-zip-hello.zip") with 7z.exe
5) I see the file "test-7-zip-hello.htm" within the 7-zip interface.
6) I open "Windows Explorer" (explorer.exe) and navigate to the temp folder:
C:\Documents and Settings\Kevin\Local Settings\Temp\
7) I right click on the file "test-7-zip-hello.htm" within the 7-zip interface.
8) I select "open" from the context-menu
9) I watch in the temp folder while waiting for Internet Explorer to open showing the file "test-7-zip-hello.htm"
10) I see a folder named "7zO13E.tmp" (or similar temporary name) created in the temp folder:
C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13E.tmp\
11) Immediately, the folder "7zO13E.tmp" disappears (removed) from the temp folder.
This is not as expected.
12) Still waiting... and Internet Explorer opens with the filename in the address bar:
C:\Documents%20and%20Settings\Kevin\Local%20Settings\Temp\7zO13E.tmp\Test-7zip-Hello.htm
(This is of course equivalent to:
C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13E.tmp\Test-7zip-Hello.htm)
13) An error message is displayed within Internet Explorer:
"The page cannot be displayed
The page you are looking for is currently unavailable ..."
14) I confirm that the file and folder have been removed from the temp folder:
"C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13E.tmp\"
"C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13E.tmp\Test-7zip-Hello.htm"
15) I repeat as in step 7: I right click on the file "test-7-zip-hello.htm" within the 7-zip interface.
16) This time I select "edit" from the context-menu
17) I watch in the temp folder and wait for my chosen file editor to open showing the file "test-7-zip-hello.htm"
18) I see a folder named "7zO13F.tmp" (or similar temporary name) created in the temp folder:
C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13F.tmp\
19) My chosen editor opens, editing the file:
C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13F.tmp\Test-7zip-Hello.htm
20) Looking in the temp folder, I confirm that the folder and file remain in place in the temp folder:
"C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13F.tmp\"
"C:\Documents and Settings\Kevin\Local Settings\Temp\7zO13F.tmp\Test-7zip-Hello.htm"
21) When I close my editor, immediately, the folder "7zO13F.tmp" disappears (removed) from the temp folder.
This is as expected.
I have since noticed that if I do not have any copies of Internet Explorer running when I click to open an .HTML file from inside of a zip file, then everything works OK.
The problem seems to be that 7-Zip will extract the requested file, and call the program. If it happens that the called program executes a new program to handle the request, or passes the request on to an already running copy of the program, and then the program executed by 7-Zip closes, and 7-Zip nearly immediately sees the program close and believes the extracted file is no longer needed, (temporary), and so 7-Zip deletes the extracted temp file before the program can actually open it.
Kevin