dbankier/TiShadow — pull request #278 by sztn (2014-05-05 20:02:37+00:00)
Title: Updated argsToPath to support more than two arguments per Ti.Filesystem.getFile documentation

Thanks for making such a wonder tool. This is my first official pull request, here goes.

According to the documentation Titanium.Filesystem.getFile "takes a variable number of arguments, where each argument is treated as a path component." ([source](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Filesystem-method-getFile)).

The argsToPath method in uglify was concatenating arguments together but was not separating them with path separators when more than two arguments were used in Titanium.Filesystem.getFile.

For example if the original source looked like:
Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "a_folder", "a_file");

The argsToPath method would generate:
Ti.Filesystem.getFile(__p.file(Ti.Filesystem.applicationDataDirectory + require("/api/TiShadow").currentApp + "/" + ("a_folder" + "a_file")))

The file would not be found because there was no path separator between the folder and the file.

I added two test cases in the filesystem.js expected/fixtures files to demonstrate the behavior (you can see this if you don't apply the change to uglify).