Skip to content

Commit

Permalink
Fix issue preventing drag-and-drop files into Explorer view (#6030)
Browse files Browse the repository at this point in the history
This change addresses an issue that prevents file drag-n-drop from
working in the Explorer view.

The problem was that there was no Electron implementation of the
accessors that Posit Workbench uses to check for file upload/download
permissions. Consequently, in desktop mode these accessors did not work.

The fix is to add accessors to the native (Electron) version of the
environment service.

Addresses #5266.


### Release Notes

#### New Features

- N/A

#### Bug Fixes

- Fix file drag and drop into the Explorer view (#5266) 

### QA Notes

This change doesn't touch the logic for Workbench so testing desktop
should be sufficient.
  • Loading branch information
jmcphers authored Jan 18, 2025
1 parent 65dbc89 commit a268bc8
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,20 @@ export class NativeWorkbenchEnvironmentService extends AbstractNativeEnvironment
@memoize
get filesToWait(): IPathsToWaitFor | undefined { return this.configuration.filesToWait; }

// --- Start Positron ---
// Always file downloads and uploads on Positron Desktop. These can be
// disabled in browser mode for security reasons (see
// BrowserWorkbenchEnvironmentService), but are always enabled in the
// desktop/Electron configuration.
get isEnabledFileDownloads(): boolean {
return true;
}

get isEnabledFileUploads(): boolean {
return true;
}
// --- End Positron ---

constructor(
private readonly configuration: INativeWindowConfiguration,
productService: IProductService
Expand Down

0 comments on commit a268bc8

Please sign in to comment.