Skip to content

Commit

Permalink
Fix: Some bugs in macOS MAS
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Dec 8, 2023
1 parent 161a84c commit 0fd6dd8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/drag-and-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function handleDrop(event)
function start()
{
// Currently the drop event does not return securityScopedBookmarks in macOS MAS, so this would not work correctly https://github.com/electron/electron/issues/40678
if(!macosMAS) return;
if(macosMAS) return;

app.event(window, 'dragenter', showDropZone);
app.event(window, 'dragleave', hideDropZone);
Expand Down
16 changes: 12 additions & 4 deletions scripts/file-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,12 @@ var file = function(path) {

if(bookmark)
{
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
break;
try
{
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
break;
}
catch {}
}

segments.pop();
Expand Down Expand Up @@ -2288,8 +2292,12 @@ var fileCompressed = function(path, _realPath = false, forceType = false, prefix

if(bookmark)
{
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
break;
try
{
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
break;
}
catch {}
}

segments.pop();
Expand Down

0 comments on commit 0fd6dd8

Please sign in to comment.