-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support moving Signal Config directory from Linux to Windows #3917
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue, unfortunately. With the latest version of Signal-Desktop (5.23.0) on Windows 10 21H1, on startup Signal-Desktop will sometimes GC the attachments and delete the ones that were created in my old Linux profile. The attachments still work if they are copied in after GC, though. My experience of using Signal-Desktop involves, after every update, copying the attachments out of an archive back into the Signal-Desktop profile directory. |
We check for 'orphaned' files, files that are no longer pointed at by a message or conversation, whenever we start up with a new version number. That's why it seems to only work sometimes. Now, why are these files considered orphaned on Windows? It's because the I think we'd welcome a PR that would fix this orphaned file checking. Start with |
I am having exactly the same problem but I am moving the Signal Desktop folder structure from Windows to Linux (aka from '' to '/'). As I can understand, nothing has been done to solve this issue the last 4 years. I tried to write a python script to convert the back-slashes Unfortunately I did not manage to update the "json" column because I am getting the error message: My script is as follows: from sqlcipher3 import dbapi2 as sqlite
# Key from ~/.config/Signal/config.json
key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
conn = sqlite.connect("db.sqlite")
cur = conn.cursor()
cur.execute(f"PRAGMA key=\"x'{key}'\";");
cur.execute("SELECT rowid, json FROM messages WHERE hasAttachments = 1;")
for row in cur.fetchall():
rowid = row[0]
json = row[1]
json = json.replace('\\', '/')
upd = conn.cursor()
# The following command will fail with an error message
upd.execute(f'''UPDATE messages SET json = '{json}' WHERE rowid = {rowid}''')
upd.close()
cur.close()
conn.commit()
conn.close() Does anybody know what this |
@EmmanuelIT |
Thank you very much. I just had to remove the triggers on messages table, run the query and then recreate the triggers. |
Bug Description
After moving ~/.config/Signal from a Linux machine to %APPDATA%\Signal on a Windows machine, Signal-Desktop seems to garbage-collect all of my old attachments and sticker packs. My ~4GB of attachments in
attachments.noindex
are deleted, as well as most ofstickers.noindex
.Attachments and stickers are not always deleted, for me this happened twice: on first run (after which I copied them back), and after the update to v1.30.0.
The moved profile does not appear to have any issues other than the loss of attachments and stickers.
Steps to Reproduce
I am not sure, but I think that moving a Signal-Desktop profile from Linux to Windows, then updating Signal-Desktop or whatever triggers attachment GC, should manifest this problem.
Actual Result: Most files are deleted from
attachments.noindex
andstickers.noindex
Expected Result: Attachments and stickers remain in
attachments.noindex
andstickers.noindex
Screenshots
Platform Info
Signal Version: v1.30.0
Operating System: Windows 10 1909
Linked Device Version: Signal-iOS 3.2.0.10
Link to Debug Log
https://debuglogs.org/c09f0f366193edeee998b4863f5e8e8d094855380941168cbbc8fdc3a84531b9
The text was updated successfully, but these errors were encountered: