bilelmoussaoui / nautilus-git

Nautilus/Nemo extension to add important information about the current git directory
GNU General Public License v3.0
149 stars 9 forks source link

Error where there are space or ' char in the folder name #31

Open geekosaurusR3x opened 7 years ago

geekosaurusR3x commented 7 years ago

Hi I just found a bug : There is nothing displayed when there is a space or ' in the path

Shell trace :

Traceback (most recent call last):
  File "/usr/share/nautilus-python/extensions/git.py", line 60, in get_widget
    if utils.is_git(uri):
  File "/usr/share/nautilus-git/src/utils.py", line 38, in is_git
    folder_path).lower()
  File "/usr/share/nautilus-git/src/utils.py", line 59, in execute
    stderr=PIPE, cwd=working_dir)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] Aucun fichier ou dossier de ce type: "/home/skad/Herdelia's%20Legacy"
('Handling file: ', "file:///home/skad/Herdelia's%20Legacy/Rex%20Parallel")
('file scheme: ', 'file')
Traceback (most recent call last):
  File "/usr/share/nautilus-python/extensions/git.py", line 60, in get_widget
    if utils.is_git(uri):
  File "/usr/share/nautilus-git/src/utils.py", line 38, in is_git
    folder_path).lower()
  File "/usr/share/nautilus-git/src/utils.py", line 59, in execute
    stderr=PIPE, cwd=working_dir)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] Aucun fichier ou dossier de ce type: "/home/skad/Herdelia's%20Legacy/Rex%20Parallel"
bilelmoussaoui commented 7 years ago

I will fix that on the next release! Thanks for pointing that out :+1:

geekosaurusR3x commented 7 years ago

Thank :)