Skip to content

Commit 0fd6dd8

Browse files
committed
Fix: Some bugs in macOS MAS
1 parent 161a84c commit 0fd6dd8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

scripts/drag-and-drop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function handleDrop(event)
119119
function start()
120120
{
121121
// Currently the drop event does not return securityScopedBookmarks in macOS MAS, so this would not work correctly https://github.com/electron/electron/issues/40678
122-
if(!macosMAS) return;
122+
if(macosMAS) return;
123123

124124
app.event(window, 'dragenter', showDropZone);
125125
app.event(window, 'dragleave', hideDropZone);

scripts/file-manager.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,12 @@ var file = function(path) {
635635

636636
if(bookmark)
637637
{
638-
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
639-
break;
638+
try
639+
{
640+
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
641+
break;
642+
}
643+
catch {}
640644
}
641645

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

22892293
if(bookmark)
22902294
{
2291-
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
2292-
break;
2295+
try
2296+
{
2297+
this.macosScopedResources.push(electronRemote.app.startAccessingSecurityScopedResource(bookmark));
2298+
break;
2299+
}
2300+
catch {}
22932301
}
22942302

22952303
segments.pop();

0 commit comments

Comments
 (0)