{ "id": "173815", "key": "TIMOB-27191", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-15T14:02:30.000+0000", "created": "2019-06-27T14:11:05.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "20791", "name": "Release 8.0.2", "archived": false, "released": true, "releaseDate": "2019-06-18" } ], "issuelinks": [ { "id": "57719", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "173817", "key": "TIMOB-27193", "fields": { "summary": "Android: Ti.Filesystem.File.createFile() may alter location of specified path", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "57857", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "174238", "key": "TIMOB-27458", "fields": { "summary": "Parity: Ti.Filesystem.getFile inconsistent in support of various URIs across platforms", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "57718", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "144873", "key": "TIMOB-18583", "fields": { "summary": "TiAPI: Create Node-compatible filesystem module API", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2019-10-30T14:58:41.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "A URI like this: \"file:/data/user/0/com.appcelerator.testApp.testing/cache/_tmp/rmdir1561643019762/myfile.txt\" should be valid and supported.\r\n\r\nHowever, Android's logic uses some string matching rather than URI parsing to handle the value and it appears to use incorrect logic when the file URI does not have the two trailing slashes before the path.", "attachment": [], "flagged": false, "summary": "Android: Ti.Filesystem.getFile is not tolerant of file: URIs without file:// prefix", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 1169, "state": "closed", "name": "2019 Sprint 22", "startDate": "2019-10-21T15:38:21.747Z", "endDate": "2019-11-03T15:38:00.000Z", "completeDate": "2019-11-04T18:36:57.022Z", "originBoardId": 114 }, { "id": 1146, "state": "closed", "name": "2019 Sprint 13", "startDate": "2019-06-18T06:36:49.723Z", "endDate": "2019-07-01T06:36:00.000Z", "completeDate": "2019-07-01T16:45:24.126Z", "originBoardId": 114 }, { "id": 1168, "state": "closed", "name": "2019 Sprint 21", "startDate": "2019-10-07T18:35:57.052Z", "endDate": "2019-10-20T18:35:00.000Z", "completeDate": "2019-10-21T15:38:00.182Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "452058", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to master, since this was a very specific bug fix needed for the Node compatible fs shim, and I included test cases that exposed and proved the fix.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-10-15T14:02:30.000+0000", "updated": "2019-10-15T14:02:30.000+0000" }, { "id": "452361", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, fix verified in SDK version {{}} Tested with variations of the test case in: https://github.com/appcelerator/titanium_mobile/pull/11098/files#diff-f9ca2bcf4d55586a8d003e3c0bd51db5. e.g:\r\n\r\n{code:java}\r\n const appJSURI = isIOS ? 'app.js' : 'app://app.js'; // iOS doesn't support app: uris!\r\n\t\t\tconst appJS = Ti.Filesystem.getFile(appJSURI);\r\n\r\n\t\t\t// Generate a file:// URI for the temp dir. Android reports one as-is, iOS reports an sbolute filepath so we pre-pend file:// to it\r\n\t\t\t// file:///data/user/0/com.appcelerator.testApp.testing/cache/_tmp on Android\r\n\t\t\t// Note also, that IOS reports trailing slash, Android does not\r\n\t\t\tconst prefix = isIOS ? `file://${Ti.Filesystem.tempDirectory}` : `${Ti.Filesystem.tempDirectory}/`;\r\n\t\t\tfileURI = `${prefix}app.js`;\r\n\t\t\tconsole.log(`[1] Copying app.js to ${fileURI}`);\r\n\t\t\tappJS.copy(fileURI);\r\n\t\t\tnoSchemeTempAppJS = fileURI.substring(7); // should be /data/user/0/com.appcelerator.testApp.testing/cache/_tmp/app.js\r\n\t\t\tconsole.log(`[2] Copy's file path should be: ${noSchemeTempAppJS}`);\r\n\r\n\t\t\tconst appDataPrivateJS = `${Ti.Filesystem.applicationDataDirectory}/appdata-private.js`;\r\n\t\t\tappJS.copy(appDataPrivateJS);\r\n\t\t\tconsole.log(`[3] Copying app.js to ${appDataPrivateJS}`);\r\n{code}\r\n\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11098\r\n\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-30T12:25:12.000+0000", "updated": "2019-10-30T12:25:12.000+0000" }, { "id": "452365", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "SDK Version ^ 8.3.0.v20191028152746", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-30T14:58:41.000+0000", "updated": "2019-10-30T14:58:41.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }