1. Christian Ebert
  2. muttils


Christian Ebert  committed eaed895

pybrowser: webbrowser does not register .exe on cygwin

  • Participants
  • Parent commits ee532af
  • Branches default

Comments (0)

Files changed (1)

File muttils/pybrowser.py

View file
         if app is not None:
             self.ui.app = app
         self.appname = util.progname(self.ui.app)
+        self.cygwin = util.cygwin()
         if evalurl: # check remote url protocol scheme
             self.ui.proto = 'web'
             u = urlregex.urlregex(self.ui, uniq=False)
     def cygpath(self, tb):
         '''Do we have to call cygpath to transform local path to windows file
         system path?'''
-        if not util.cygwin() or tb:
+        if not self.cygwin or tb:
             return False
             return (self.ui.app.find('/cygdrive/') == 0 and
         if tb:
             notty = not util.termconnected()
             screen = 'STY' in os.environ
+            if self.cygwin:
+                self.ui.app = os.path.splitext(self.ui.app)[0]
         cygpath = self.cygpath(tb)
         if not self.items:
             self.items = [self.ui.configitem('net', 'homepage')]