Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6453] MobileWeb: Ti.include() relative files sometimes causes irrational paths

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-12-08T15:06:31.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-49, Release 1.8.0.1
ComponentsMobileWeb
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2011-12-04T19:10:39.000+0000
Updated2017-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

FileDateSize
app.js2011-12-08T03:15:01.000+000027
myinclude.js2011-12-08T03:15:11.000+000027

Comments

  1. Chris Barber 2011-12-08

    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.
  2. Lee Morris 2017-03-03

    Closing ticket.

JSON Source