{ "id": "175701", "key": "TIMOB-28226", "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": [], "resolution": null, "resolutiondate": null, "created": "2020-11-04T10:40:55.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" }, { "id": "21129", "name": "Release 9.2.2", "archived": false, "released": true, "releaseDate": "2020-10-29" } ], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2020-11-04T14:43:54.000+0000", "status": { "description": "Submitted for code review", "name": "In Review", "id": "10003", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "components": [ { "id": "13600", "name": "LiveView", "description": "Live preview of Titanium apps" } ], "description": "h5.Description\r\n\r\nIf a project directory path contains {{Resources}} anywhere in the path (e.g. /Users/ewan/Resources/my-titanium-app/) then liveview will error out with {{Project directory \"\" is not a valid Titanium project}} (e.g. {{Project directory \"/Users/ewan/Resources/\" is not a valid Titanium project}}\r\n\r\nThis is because liveview is performing a bad lookup on whether the provided project directory contains {{Resources}} or not, and then popping off the last segment of the path regardless of where {{Resources}} is found\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Create a project called {{Resources}}\r\n2. cd into that directory and create a new titanium app\r\n3. Build the project with liveview enabled\r\n\r\nh5.Actual\r\n\r\nLiveview complains that the parent directory is not a titanium project\r\n\r\nh5.Expected\r\n\r\nLiveview should function just fine", "attachment": [], "flagged": false, "summary": "Liveview: Build errors if project directory path contains Resources ", "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": null, "comment": { "comments": [ { "id": "457439", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "PR: https://github.com/appcelerator/liveview/pull/205\r\n\r\nTo apply this fix before it ships:\r\n\r\n1. Open {{~/Library/Application Support/Titanium/mobilesdk///node_modules/liveview/lib/fserver.js}} where OS is one of osx, linux, or win32 and SDK is the SDK version you want to apply the fix to\r\n2. Look for {{RESOURCE_DIR = (!~RESOURCE_DIR.indexOf('Resources')) ? RESOURCE_DIR + '/Resources' : RESOURCE_DIR;}} (should be line 165) and replace with the below\r\n{code}\r\nif (path.basename(RESOURCE_DIR) !== 'Resources') {\r\n\tRESOURCE_DIR = path.join(RESOURCE_DIR, 'Resources');\r\n}\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-11-04T11:00:43.000+0000", "updated": "2020-11-04T11:00:43.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }