datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Fix differentiation between files in `git` and `git-annex` #149

Closed jsheunis closed 2 years ago

jsheunis commented 2 years ago

While writing a test for fsbrowser_item.py, I saw this code in update_from_status_result():

type_ = res.get('type')
if type_:
    # guess by type, by default
    type_icon = None
    if type_ == 'file':
        # for files we can further differentiate
        type_icon = 'file-annex'
        if res.get('key'):
            type_icon = 'file-git'

Isn't it an annexed file that would have the key property. If so, and unless I'm misunderstanding, shouldn't that part of the code read:

        type_icon = 'file-git'
        if res.get('key'):
            type_icon = 'file-annex'
adswa commented 2 years ago

I think you're assessment is correct, it should be the other way around

mih commented 2 years ago

Yes, same here. The current implementation is wrong.