[Archive] Fixed permission handling for windows-zipped files
[Issue] When having files with added P attribute on windows, then zipped
and unzipped on tizen using Web API, files have invalid access rights.
Reproduction:
1. create file on windows
2. add P attribute: attrib -a +p test_file.txt
3. zip file with 7-zip
4. copy to tizen device and unzip with webapi:
function errorCallback(error) {console.log(error);}
function successCallback() {console.log("done");}
function progressCallback(opId, val, name) {
console.log(
"extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
}
function openSuccess(archive) {
archive.extractAll("downloads", successCallback, errorCallback, progressCallback);
}
tizen.archive.open("downloads/test_kona.zip", "r", openSuccess);
5. check file permission:
------x--- 1 owner priv_mediastorage User::App::Shared 9 Oct 31 14:07 testfile.txt
[Verification] With this commit, above scenario ends with proper 755
permissions (for windows files), and recreated files permissions if
points 1-3 are done on ubuntu.
TCT passrate is 100%.
Change-Id: I8d6e3de036b39f5180b4773eaee5b710b0def9be