[AC-1003] Android: Empty value when reading a resource directory js file
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-03-25T04:39:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android |
Reporter | Alejandro F. Carrera |
Assignee | Ritu Agrawal |
Created | 2014-03-22T11:19:40.000+0000 |
Updated | 2016-03-08T07:37:20.000+0000 |
Description
You have a .js file at Resources/lib named library.js with content:
var a = "hello world";
----------
if you try read the file like a text plain file
var value = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory(), "lib/library.js").read().toString();
value should be "var a = \"hello world\";", but value is empty -> "".
----------
if you change library.js to library.lib or other extension is fine.
Resolving it as a duplicate of TIMOB-16678. Reporter reported the same issue with Aptana Studio as well.