Zed Database local_paths
format.
#18895
Unanswered
HarshNarayanJha
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see that in
~/.local/share/zed/db/0-stable/db.sqlite
there is aworkspaces
table with alocal_paths
field that I am interested in extracting it out. It's datatype seems to be BLOB (binary storage in sqlite).I don't understand why path needs to be stored in binary format... anyway I tried to parse in python and get this string
b'\x01\x00\x00\x00\x00\x00\x00\x004\x00\x00\x00\x00\x00\x00\x00/home/user/Documents/GitHub/some/project'
In order to get the path out of it, the best I could think of is to split it by
/
and join back with/
from the first index.This worked for most paths, but for some (2-3 in my case), the hex part had an
/
, which messed up the path extraction, prepending a hex part to the path, making it invalidJust what is that binary part in the path and how to properly get the path (without any tricks?)
Beta Was this translation helpful? Give feedback.
All reactions