Closed
Bug 1030029
Opened 11 years ago
Closed 9 years ago
Some zipped plugins (e.g. GitHub) fail to install because nsIZipReader extracts files read-only
Categories
(Other Applications :: ChatZilla, defect)
Other Applications
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hunboy, Assigned: bugzilla-mozilla-20000923)
References
Details
(Keywords: regression, Whiteboard: [cz-0.9.93])
Attachments
(1 file)
1.52 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
During installing cz-plugin-***.zip it fails with this error message:
An error occurred extracting the compressed source: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsILocalFile.remove]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: chrome://chatzilla/content/static.js :: cli_installPlugin :: line 3391" data: no]
Reporter | ||
Comment 1•11 years ago
|
||
mozilla central
2012.12.04 last good
2012.12.05 first fail
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5c6b71348e20&tochange=0947e291578a
the plausible blocker bug is Bug 369108
Depends on: 369108
Keywords: regression
Reporter | ||
Comment 2•11 years ago
|
||
the dead point is on the trunk:
http://hg.mozilla.org/chatzilla/file/bc1416776f05/xul/content/static.js#l3369
Reporter | ||
Comment 3•11 years ago
|
||
when I comment out the
initJSFile.remove(false);
line, it works.
the install-plugin.temp file is read only. This is the problem.
Reporter | ||
Comment 4•11 years ago
|
||
CC-ed Brian R. Bondy
The nsIZipReader extracts the files in readonly mode permanently based on Bug 369108, so unzips the all of plugin files as readonly.
I've checked the zipReader's inteface and no way to set up filemode at zipReader.extract()
void extract(in AUTF8String zipEntry, in nsIFile outFile)
this is a permanent problem for update/delete plugin as well.
Comment 5•11 years ago
|
||
So I think we should either not set the permissions mode when extracting to avoid getting the read only in the first place, or we could update nsIFile's implementation on Windows to remove the read only bit before removing if it fails.
Updated•10 years ago
|
Flags: needinfo?(gijskruitbosch+bugs)
Assignee | ||
Comment 6•9 years ago
|
||
It's not clear where the original report here was getting the zip, but I know GitHub's zips are a problem:
[22:14:20] [INFO] Downloading plugin from 'https://github.com/twpol/cz-plugin-network-trace/archive/master.zip'…
[22:14:21] [INFO] Installing from 'C:\Users\James\AppData\Roaming\ChatZilla\Profiles\0n2xrybw.default\chatzilla\plugin-install.temp.zip' to 'E:\Documents\Coding\ChatZilla\Scripts'…
[ERROR] An error occurred extracting the compressed source: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsILocalFile.remove]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: chrome://chatzilla/content/static.js :: cli_installPlugin :: line 3329" data: no]
Assignee | ||
Updated•9 years ago
|
Summary: install plugin is broken with zipped plugin → Some zipped plugins (e.g. GitHub) fail to install because nsIZipReader extracts files read-only
Assignee | ||
Updated•9 years ago
|
Assignee: rginda → bugzilla-mozilla-20000923
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8716805 -
Flags: review?(gijskruitbosch+bugs)
Comment 9•9 years ago
|
||
Comment on attachment 8716805 [details] [diff] [review]
Set permissions to 0666 for every extracted file
r=me assuming this was tested on Windows, and throws just as or less often as/than the .remove() call (ie what if we don't have the rights to set the permissions to 0666 ? Presumably the setter will throw, but then, the .remove() call would also have thrown...)
Flags: needinfo?(gijskruitbosch+bugs)
Attachment #8716805 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 10•9 years ago
|
||
This was tested on Windows - the SetPermission implementation looks for any-read and any-write, of which only any-write is implemented (as setting and unsetting the read-only flag). Other platforms should work per Unix.
http://hg.mozilla.org/chatzilla/file/ecf32181bbab
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•9 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Whiteboard: [cz-0.9.93]
You need to log in
before you can comment on or make changes to this bug.
Description
•