Permalink
Browse files

Fixed issue #10

  • Loading branch information...
1 parent 4c8b975 commit 42e3acd1212901cb0cf4943821ab44f411a3d277 @gornostal committed Jul 4, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 Modific.py
View
@@ -27,7 +27,7 @@ def get_vcs(directory):
Determines, which of VCS systems we should use for given folder.
Currently, uses priority of definitions in settings.get('vcs')
"""
- vcs_check = [ (lambda vcs: lambda dir: os.path.exists(os.path.join(dir,'.'+vcs))
+ vcs_check = [ (lambda vcs: lambda dir: os.path.exists(os.path.join(dir,'.'+vcs))
and {'root': dir, 'name': vcs}) (vcs)
for vcs,_ in get_vcs_settings() ]
@@ -198,8 +198,10 @@ def is_enabled(self):
def run(self, edit):
vcs = get_vcs(self.get_working_dir())
- get_command = getattr(self, '{0}_diff_command'.format(vcs['name']),None)
- if get_command: self.run_command(get_command(self.view.file_name()), self.diff_done)
+ filename = os.path.basename(self.view.file_name())
+ get_command = getattr(self, '{0}_diff_command'.format(vcs['name']), None)
+ if get_command:
+ self.run_command(get_command(filename), self.diff_done)
def diff_done(self, result):
pass

0 comments on commit 42e3acd

Please sign in to comment.