Skip to content

fix: avoid a double separator in automatic uploads remote path - #5033

Open
RaphaelFakhri wants to merge 2 commits into
owncloud:masterfrom
RaphaelFakhri:fix/automatic_uploads_double_separator
Open

RaphaelFakhri wants to merge 2 commits into
owncloud:masterfrom
RaphaelFakhri:fix/automatic_uploads_double_separator

Conversation

@RaphaelFakhri

Copy link
Copy Markdown

Related Issues

App: Refs #4451

Folders picked as the automatic uploads destination store their remote path with a trailing separator (for example, /Bbbbb/). AutomaticUploadsWorker then appends another separator before the file name, so every picture or video upload targets a path such as /Bbbbb//PXL_20240819_120404334.jpg. That doubled path is stored in the transfers table and sent in the PUT request, as seen in the logs in the issue.

This change composes the remote path through FolderBackUpConfiguration.getRemotePathForFile(), which trims a trailing separator from the upload path before appending the file name. Configurations saved before this change (with or without a trailing separator, and the root folder /) now produce a single separator.

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required): not required

QA

  • New unit test FolderBackUpConfigurationTest covers upload paths without a trailing separator, with a trailing separator, and the root folder. The last two fail without the fix.
  • ./gradlew detekt :owncloudDomain:testDebugUnitTest :owncloudApp:compileOriginalDebugKotlin passes.
  • Manual check: pick a destination folder for picture uploads, take a picture, and confirm the upload in the uploads list and the server request use /<folder>/<file> with a single separator.

Signed-off-by: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com>
@RaphaelFakhri
RaphaelFakhri requested a review from a team as a code owner October 24, 2026 20:08
@CLAassistant

CLAassistant commented Oct 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com>
@jesmrec

jesmrec commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

@RaphaelFakhri thanks a lot for your contribution! we'll check it as soon as we have some time for it 😅 . Keep tuned, we could ask you for code review changes or fixes in the code! It's cool to check that the commits are verified and follow the conventional commits convention 💯

Just one consideration: you must sign the CLA, otherwise the PR will not move forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Auto uploads result in a conflict status when trying to retry them

3 participants