{ "id": "175618", "key": "TIMOB-28177", "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": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-11-20T15:14:52.000+0000", "created": "2020-10-07T19:50:44.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "filesystem", "parity", "tempdirectory" ], "versions": [], "issuelinks": [ { "id": "58798", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "175384", "key": "TIMOB-28058", "fields": { "summary": "Android: Change Ti.Filesystem \"temp\" APIs to use app's cache folder", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-20T15:14:52.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": "*Summary:*\r\nOn Android, the [Ti.Filesystem.createTempFile()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem-method-createTempFile] method creates the file under the root {{Ti.Filesystem.applicationCacheDirectory}} when it should be created under the {{Ti.Filesystem.tempDirectory}} instead like iOS.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below code on Android.\r\n# In the log, notice {{nativePath}} is immediately under the {{cache}} folder.\r\n\r\n{code:javascript}\r\nvar tempFile = Ti.Filesystem.createTempFile();\r\nconsole.log('@@@ nativePath: ' + tempFile.nativePath);\r\nconsole.log('@@@ tempDirectory: ' + Ti.Filesystem.tempDirectory);\r\nconsole.log('@@@ applicationCacheDirectory: ' + Ti.Filesystem.applicationCacheDirectory);\r\n{code}\r\n\r\n*Note:*\r\nOn Android, the {{tempDirectory}} is a subfolder under the {{applicationCacheDirectory}}. This is okay since Android does not natively support both of these folders. You are expected to put temp files under the app's sandboxed \"cache\" folder. However, Titanium should keep temp files under a separate temp subfolder so that we can clean it ourselves on app startup and let the Android OS clean the rest of the cached files when needed.\r\n", "attachment": [], "flagged": false, "summary": "Android: createTempFile() should create file under Ti.Filesystem.tempDirectory", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1208, "state": "closed", "name": "2020 Sprint 21", "startDate": "2020-10-12T16:34:00.000Z", "endDate": "2020-10-23T16:34:00.000Z", "completeDate": "2020-10-23T02:32:43.674Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "457192", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12161", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-07T19:51:44.000+0000", "updated": "2020-10-07T19:51:44.000+0000" }, { "id": "457284", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for Jenkins build.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-19T20:14:12.000+0000", "updated": "2020-10-19T20:14:12.000+0000" }, { "id": "457285", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to master for 9.3.0 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-10-19T21:30:52.000+0000", "updated": "2020-10-19T21:30:52.000+0000" }, { "id": "457657", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. fix verified in SDK version {{9.3.0.v20201119063936}}.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/12161", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-20T15:14:45.000+0000", "updated": "2020-11-20T15:14:45.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }