marook / tagfs

Fuse tag file system
GNU General Public License v3.0
125 stars 9 forks source link

Infinite nesting of subcategories #7

Closed knickum closed 11 years ago

knickum commented 11 years ago

I am currently unable to replicate the example given using 'Ted' and 'banana'.

If I create the directories and .tag files as specified:

/items
|-- Ted
    |-- .tag
|-- banana
    |-- .tag

Where the contents of /items/Ted/.tag is: movie genre: comedy

and /items/banana/.tag is: fruit genre: delicious

Then run 'fstag -i /items /test', the result is:

/test
|-- genre
    |-- comedy
        |-- Ted -> /items/Ted
        |-- genre
            |-- comedy
                |-- Ted -> /items/Ted
                |-- genre
                ....
    |-- delicious
        |-- banana -> /items/banana  
        |-- genre
            |-- delicious
            ....

I also have a question as to why i don't see 'movie' or 'fruit' appear anywhere, but I suspect that is coming from the default value of enableValueFilters.

marook commented 11 years ago

Nested context/value filters are currently not handled correctly. tagfs doesn't recognize that it's filtering the same items again and again with every level of recursion. I'm going to fix that.

You are right about the default filters. You don't see 'movie' or 'fruit' appear.... at least they seem not to appear. Check out the .any_context subdirectory. It should look like this:

/test
|-- .any_context
    |-- comedy
        |-- ...
    |-- delicious
        |-- ...
    |-- fruit
        |-- ...
    |-- movie
        |-- ...
marook commented 11 years ago

Fixed this issue with commit a8f003c379a154c13c564bdbfd563925d116a2c8

knickum commented 10 years ago

I think there is still an issue here.

Modify the above files so that items/Ted/.tag contains:

movie
Genre: comedy
Genre: misc

and items/banana/.tag contains:

fruit
Genre: fruit
Genre: misc

And after mount, infinite recursion will still occur (e.g. Genre/comedy/Genre/comedy/Genre/misc/....).

I've been trying to debug this, but I'm just not familiar enough with the code...