projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86e4be3
)
Bypass descryption in case that file's size is 0
author
yons.kim
<yons.kim@samsung.com>
Tue, 24 Nov 2015 10:50:51 +0000
(19:50 +0900)
committer
yons.kim
<yons.kim@samsung.com>
Tue, 24 Nov 2015 10:50:51 +0000
(19:50 +0900)
Until now, crosswalk-tizen does descryption although the files' contents
are empty(the file size is 0). It's ineffective.
Fix code to bypass it in the case.
common/resource_manager.cc
patch
|
blob
|
history
diff --git
a/common/resource_manager.cc
b/common/resource_manager.cc
index 8040c7e06458ce1efe1aad71c44f17c76ca143a2..fdd6fd951b78cb594af7a85ee40807576597a988 100644
(file)
--- a/
common/resource_manager.cc
+++ b/
common/resource_manager.cc
@@
-580,6
+580,11
@@
std::string ResourceManager::DecryptResource(const std::string& path) {
// Read filesize
fseek(src, 0, SEEK_END);
size_t src_len = ftell(src);
+ if (src_len == 0) {
+ // if the file exists and is empty, bypass it
+ fclose(src);
+ return path;
+ }
rewind(src);
// Read buffer from the source file