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

Downloaded /Shares tar contains resource (files|folder) with leading / in Response #4636

Closed
SagarGi opened this issue Sep 22, 2022 · 1 comment
Labels

Comments

@SagarGi
Copy link
Member

SagarGi commented Sep 22, 2022

Describe the bug

When downloading the /Shares folder as tar through API request containing different resources (files | folders), then viewing the archived tar file, it contains the leading / in each files and folder inside the archived file.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create user user1 and user2
  2. with user1 create file file.txt with content some content
  3. user1 creates folder newfolder
  4. share the file with user2
  5. user2 accepts the file file.txt from user1
  6. Download the /Shares folder as tar.

CURL command to download the Shares folder is

curl -X GET -vk -u user2:1234 -H "OCS-APIREQUEST:true" https://host.docker.internal:9200/archiver?<folder-id>

Note: The response from the above command should be set somewhere in the local file system as .tar (for example i have set to Shares.tar)

Expected behavior

As user1 downloads the root as download.tar (containing all files and folder) then view the tar with command:

tar -tvf  download.tar

output :

-rw-r--r-- 0/0              12 2022-09-22 14:17 file.txt
drwxr-xr-x 0/0               0 2022-09-22 14:17 newfolder

It does not contains leading /

Actual behavior

For the downlaoded Shares.tar

tar -tvf  Shares.tar

output :

drwxr-xr-x 0/0               0 2022-09-22 14:10 /
-rw-r--r-- 0/0               9 2022-09-22 14:10 /file.txt

We see leading / for each files and folder

Note

Downlaoding the Shares folder as tar is only possible with API.

@saw-jan
Copy link
Member

saw-jan commented Aug 20, 2024

I will close this as expected as there is no problem opening the archive file. Tests adjustment in PR #9864.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants