[TIMOB-6453] MobileWeb: Ti.include() relative files sometimes causes irrational paths
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-12-08T15:06:31.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Sprint 2011-49, Release 1.8.0.1 |
Components | MobileWeb |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2011-12-04T19:10:39.000+0000 |
Updated | 2017-03-03T22:52:25.000+0000 |
Description
After the loader resolves a relative path, it does the following check:
if (/^\./.test(name)) {
throw new Error("Irrational path \"" + name + "\"");
}
The problem is sometimes a valid path can be "../path/to/somefile.js" which gets appended to the base URL which throws an irrational path error.
The problem is discovered when testing Ti.Facebook in the KitchenSink.
The solution may be to just remove these lines of code, but there is probably a more fundamental problem with the relative path resolution that needs to be fleshed out with a specific test case.
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-12-08T03:15:01.000+0000 | 27 |
myinclude.js | 2011-12-08T03:15:11.000+0000 | 27 |
Pull request: https://github.com/appcelerator/titanium_mobile/pull/883 Test with attached files or test with kitchen sink. For KitchenSink, go to Mashups tab, then Facebook, then Login/logout. It will throw an error because Ti.Facebook.LoginButton does not exist. Hit back button, then select "Query" option. Again it will throw a LoginButton error instead of the irrational path error.
Closing ticket.