Skip to content

Commit

Permalink
feat: click binoculor icon/locate in file tree for non project files …
Browse files Browse the repository at this point in the history
…opens file in explorer
  • Loading branch information
abose committed Jan 12, 2024
1 parent ac800ee commit ccd811b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/project/ProjectModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,14 @@ define(function (require, exports, module) {
path = _getPathFromFSObject(path);

if (!this.isWithinProject(path)) {
return d.resolve().promise();
Phoenix.app.openPathInFileBrowser(path)
.then(d.resolve)
.catch(d.reject);
return d.promise();
}

var parentDirectory = FileUtils.getDirectoryPath(path),
self = this;
this.setDirectoryOpen(parentDirectory, true).then(function () {
const self = this;
this.setDirectoryOpen(FileUtils.getDirectoryPath(path), true).then(function () {
if (_pathIsFile(path)) {
self.setSelected(path);
}
Expand Down

0 comments on commit ccd811b

Please sign in to comment.