{ "id": "169906", "key": "TIMOB-25352", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-22T00:22:44.000+0000", "created": "2017-09-26T15:08:18.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" }, { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" }, { "id": "19542", "description": "", "name": "Release 6.2.2", "archived": false, "released": true, "releaseDate": "2017-09-19" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-22T00:22:50.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\n*This only occurs on ws-local target for me*, I have a fix locally just need to write a unit test\r\n\r\nWhen calling Ti.Database.install('/database/path.db', 'example') on Windows the function will throw an error. Tracking this down the error originates from the Ti.Filesystem APIs, used [here|https://github.com/appcelerator/titanium_mobile_windows/blob/67db155c01654c8442d32e418da6da66c1cf7aef/Source/TitaniumKit/src/DatabaseModule.cpp#L23-L35].\r\n\r\nAfter walking it through the error appeared to be caused by the path being like {{C:\\Users\\ewan\\Documents\\debug_proj\\NG\\NG.Windows10.Win32\\Debug\\AppX\\\\./databases/kitchensink.db}}, as the install function prefixes the resourcesDirectory onto the specified path. Based off documentation and other platforms I believe this is incorrect and the path should be passed through untouched allowing the Filesystem APIs to resolve it correctly\r\n\r\nh5.Steps to reproduce\r\n\r\n# Download the zipped resources and build for ws-local\r\n\r\nh5.Actual\r\n\r\nError is thrown \r\n\r\n{code}\r\nError: copy: unknown exception\r\n{code}\r\n\r\nh5.Expected\r\n\r\nNo error should be thrown", "attachment": [ { "id": "63364", "filename": "Resources.zip", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-09-26T15:05:41.000+0000", "size": 1372192, "mimeType": "application/zip" } ], "flagged": false, "summary": "Windows: Ti.Database.install should not prefix the specified path with the resourcesDirectory", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Ti SDK: 6.2.2.GA, 6.3.0.v20170925234416, 7.0.0.v20170925235044", "closedSprints": [ { "id": 1000, "state": "closed", "name": "2018 Sprint 04 SDK", "startDate": "2018-02-12T04:23:01.913Z", "endDate": "2018-02-26T04:23:00.000Z", "completeDate": "2018-02-26T19:36:01.769Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 }, { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "434221", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1181", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-02-08T05:06:55.000+0000", "updated": "2018-02-08T05:06:55.000+0000" }, { "id": "439346", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "*Closing ticket.*\r\n\r\nTested using the test case above, I also used {{alert(Ti.Filesystem.getFile('./app.js').exists());}} but it returned {{true}} before and after the fix\r\n\r\nThe fix is present in SDK:\r\n\r\n{noformat}\r\n7.4.0.v20180718223310\r\n{noformat}\r\n\r\n*ENV*\r\n{noformat}\r\nNoka lumia 550 (Win 10) \r\nWs-emulator\r\nWindows 10 Pro: 1803\r\nAppc NPM: 4.2.13\r\nAppc CLI: 7.0.4\r\nTi CLI Ver: 5.1.1\r\nNode Ver: 8.9.1\r\nNPM Ver: 6.1.0\r\n{noformat}", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2018-07-19T15:33:01.000+0000", "updated": "2018-07-19T15:33:01.000+0000" }, { "id": "440972", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening this, just to update fixVersion.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-08-22T00:22:23.000+0000", "updated": "2018-08-22T00:22:23.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }