Skip to content

Commit

Permalink
Merge pull request #11204 from rstudio/bugfix/unknown_file_types_open…
Browse files Browse the repository at this point in the history
…_file

Allow fallback unknown text file types to open in Desktop
  • Loading branch information
jgutman committed May 13, 2022
2 parents 7fbd9e9 + fdcdd48 commit 925ba91
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -607,12 +607,9 @@ public FileType getTypeByTypeName(String name)
public FileType getTypeForFile(FileSystemItem file)
{
// last ditch default type -- see if this either a known text file type
// or (for server mode) NOT a known binary type. the result of this is
// or NOT a known binary type. the result of this is
// that unknown files types are treated as text and opened in the editor
// (we don't do this on desktop because in that case users have the
// recourse of using a local editor)
String defaultType = Desktop.isDesktop() ? "application/octet-stream" :
"text/plain";
String defaultType = "text/plain";
return getTypeForFile(file, defaultType);
}

Expand Down

0 comments on commit 925ba91

Please sign in to comment.