Rework file storage #5

Open
opened 2025-01-15 13:01:17 +01:00 by lookshe · 0 comments
Owner

In the old version the path "monocles chat" was named sth. like "Pix-Art...."

The files are stored in hardcoded paths.
In https://git.fucktheforce.de/thedevstack/PiratX/src/branch/master/src/main/java/eu/siacs/conversations/persistance/FileBackend.java#L1124:

  • parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat");
  • parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat" + "/pictures");
  • parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat" + "/videos");
  • parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat" + "/documents");
  • parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat");

In https://git.fucktheforce.de/thedevstack/PiratX/src/branch/master/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java#L327

In the old version the path "monocles chat" was named sth. like "Pix-Art...." The files are stored in hardcoded paths. In https://git.fucktheforce.de/thedevstack/PiratX/src/branch/master/src/main/java/eu/siacs/conversations/persistance/FileBackend.java#L1124: * parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat"); * parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat" + "/pictures"); * parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat" + "/videos"); * parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat" + "/documents"); * parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat"); In https://git.fucktheforce.de/thedevstack/PiratX/src/branch/master/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java#L327 * File dirStickers = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + "/monocles chat" + File.separator + "Stickers"); * File dirGifs = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + "/monocles chat" + File.separator + "Stickers" + File.separator + "Animoji"); In https://git.fucktheforce.de/thedevstack/PiratX/src/branch/master/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java#L764 * return new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + "/monocles chat" + "/" + dir); In https://git.fucktheforce.de/thedevstack/PiratX/src/branch/master/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java#L5532 * parentDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS + "/monocles chat" + "/recordings");
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: thedevstack/PiratX#5
No description provided.