Skip to content

Commit

Permalink
Merge pull request #127 from mx1up/filenames-with-spaces
Browse files Browse the repository at this point in the history
fix opening filenames with spaces on linux
  • Loading branch information
crazecoder authored Mar 9, 2021
2 parents 77732a5 + 6666762 commit 315d0f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
24 changes: 0 additions & 24 deletions lib/src/plaform/linux.dart

This file was deleted.

3 changes: 1 addition & 2 deletions lib/src/plaform/open_file.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'dart:io';
import 'package:flutter/services.dart';
import 'package:open_file/src/common/open_result.dart';
import 'macos.dart' as mac;
import 'linux.dart' as linux;
import 'windows.dart' as windows;

class OpenFile {
Expand All @@ -21,7 +20,7 @@ class OpenFile {
if (Platform.isMacOS) {
_result = mac.system('open $filePath');
} else if (Platform.isLinux) {
_result = linux.system('$linuxDesktopName-open $filePath');
_result = Process.runSync('xdg-open', [filePath]).exitCode;
} else {
_result = windows.shellExecute('open', filePath);
}
Expand Down

0 comments on commit 315d0f3

Please sign in to comment.