Tagsistant icon indicating copy to clipboard operation
Tagsistant copied to clipboard

Long tag chain does not work (anymore)

Open sloonz opened this issue 8 years ago • 0 comments

Inserting an object with many tags using long tag chains (tag1/tag2/tags3/.../@) does not work anymore (worked in 0.8.1)

This scripts shows the problem : it creates 100 tags in an empty repository and then try to copy a file in tag1/tag2/tag3/.../@. It fails (expected results: "hello")

#!/bin/zsh

set -x

[ ! -d /tmp/tsbug/files ] && mkdir -p /tmp/tsbug/files
echo hello > /tmp/tsbug/test
[ -d /tmp/tsbug/files/tags ] && { fusermount -u /tmp/tsbug/files || exit 2 }
rm -rf /tmp/tsbug/repository
~/tmp/Tagsistant/src/tagsistant --repository=/tmp/tsbug/repository /tmp/tsbug/files >/dev/null || exit 1
sleep 1

p=
for i in $(seq 100) ; do
        mkdir /tmp/tsbug/files/tags/test$i || exit 1
        if [ "$p" != "" ] ; then
                p=$p"/test"$i
        else
                p=test$i
        fi
done

cp /tmp/tsbug/test /tmp/tsbug/files/store/$p/@
cat /tmp/tsbug/files/store/$p/@/test

sloonz avatar Dec 27 '17 20:12 sloonz