Skip to content

Commit

Permalink
also open dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Mar 2, 2017
1 parent aecbaa5 commit fb43d19
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions SideBarAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,17 +361,16 @@ def name(self):
return leaf;

def open(self, use_powershell = True):
if self.isFile():
if sublime.platform() == 'osx':
import subprocess
subprocess.Popen(['open', self.name()], cwd=self.dirname())
elif sublime.platform() == 'windows':
import subprocess
subprocess.Popen(['start', '', escapeCMDWindows(self.path())], cwd=self.dirname(), shell=True)
else:
from . import desktop
desktop.open(self.path())
print('using desktop')
if sublime.platform() == 'osx':
import subprocess
subprocess.Popen(['open', self.name()], cwd=self.dirname())
elif sublime.platform() == 'windows':
import subprocess
subprocess.Popen(['start', '', escapeCMDWindows(self.path())], cwd=self.dirname(), shell=True)
else:
from . import desktop
desktop.open(self.path())
print('using desktop')

def isDirectory(self):
return self._is_directory
Expand Down

0 comments on commit fb43d19

Please sign in to comment.