Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing path on a virtual filesystem #266

Open
A6GibKm opened this issue Jul 14, 2021 · 2 comments
Open

Error parsing path on a virtual filesystem #266

A6GibKm opened this issue Jul 14, 2021 · 2 comments

Comments

@A6GibKm
Copy link
Contributor

A6GibKm commented Jul 14, 2021

when trying to save on a virtual filesystem on a Flatpak environment
I get an error of type construct.core.StreamError with message Error in path (building) -> header. The path of such file is of the form

/run/user/1000/gvfs/google-drive:host=domain.com,user=xxxxxx/aosifj--IDAKSK/ASNsakdsuMOS_asoiamaoSKFN
@Evidlo
Copy link
Member

Evidlo commented Jul 17, 2021

You can test if this is an error in Construct

from construct import Struct, Bytes
s = Struct("field1" / Bytes(16))
parsed = s.parse(b'\x00' * 16)

s.build_file(parsed, '/path/to/file')
parsed = s.parse_file('/path/to/file')

@A6GibKm
Copy link
Contributor Author

A6GibKm commented Jul 17, 2021

I run that with a path /run/user/1000/doc/4a590d6a/1Ok2JCH6OhZBMia1tSPo6CDnPuMXONhrG

>>> s.build_file(parsed, path)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/app/lib/python3.9/site-packages/construct/core.py", line 355, in build_file
    self.build_stream(obj, f, **contextkw)
OSError: [Errno 29] Illegal seek

As a side effect the database gets deleted (weights 0 bytes). I am not sure if thats what the snippet does, or not. Anyways, this might be also a weird Flatpak issue.

@KeyWeeUsr KeyWeeUsr mentioned this issue Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants