Skip to content

Files deleted from a shared folder as recipient are restored to root folder. #28121

Closed

Description

@SergioBertolinSG

Steps to reproduce

  1. Having users 'User0' and 'User1' do:
  2. Using User0 create a folder 'shared'.
  3. Using User0 upload a file 'file.txt' to 'shared'.
  4. Using User0 share 'shared' folder with User1 (giving deletion permissions).
  5. Using User1 delete 'shared/file.txt'.
  6. Using User1 restore 'file.txt'.

Expected behaviour

File is restored to '/shared/file.txt'.

Actual behaviour

File is restored to '/file.txt'.

the deleted file doesn't have the expected element 'extraData' which is included in all files removed to trashbin.

Array
      │ (
      │     [0] => Array
      │         (
      │             [id] => 0
      │             [parentId] => 
      │             [mtime] => 1497342241000
      │             [name] => shared_file.txt
      │             [permissions] => 1
      │             [mimetype] => application/octet-stream
      │             [size] => 24
      │             [type] => file
      │             [etag] => 1497342241000
      │         )
      │ 
      │ )

Server configuration

Operating system:
Ubuntu 16.04

Web server:
Apache

Database:
MySQL

PHP version:
7.0

ownCloud version: (see ownCloud admin page)
current master
{"installed":"true","maintenance":"false","needsDbUpgrade":"false","version":"10.0.2.1","versionstring":"10.0.2.1","edition":"Community","productname":"ownCloud"}

Updated from an older ownCloud or fresh install:
Fresh

The content of config/config.php:


Are you using external storage, if yes which one: local/smb/sftp/...
No.

Are you using encryption:
No

Logs

Client configuration

Browser
Firefox

Logs

cc @PVince81

Activity

  1. added this to the 10.0.3 milestone on Jun 13, 2017
  2. modified the milestones: triage, 10.0.3 on Jun 19, 2017
  3. PVince81 commented on Jun 19, 2017

    @PVince81
    Contributor

    @SergioBertolinSG is this covered by your automated tests PR ?

  4. PVince81 commented on Jun 19, 2017

    @PVince81
    Contributor

    @SergioBertolinSG is this a recent regression ?

  5. PVince81 commented on Jun 23, 2017

    @PVince81
    Contributor

    Works on stable9.1 71369bc

  6. PVince81 commented on Jun 23, 2017

    @PVince81
    Contributor

    Confirmed broken on stable10

  7. PVince81 commented on Jun 23, 2017

    @PVince81
    Contributor

    On stable9.1, the copyFilesToUser that copies for user1 also automatically adds an entry:

    MariaDB [owncloud]> select * from oc_files_trash;
    +---------+----------+-------+------------+----------------+------+------+
    | auto_id | id       | user  | timestamp  | location       | type | mime |
    +---------+----------+-------+------------+----------------+------+------+
    |       1 | file.txt | user0 | 1498222859 | /shared        | NULL | NULL |
    |       2 | file.txt | user1 | 1498222859 | shared_renamed | NULL | NULL |
    +---------+----------+-------+------------+----------------+------+------+
    

    (yeah, sad inconsistencies, but unrelated).

    On stable10 only the entry for user0 is added.

  8. PVince81 commented on Jun 23, 2017

    @PVince81
    Contributor

    ok found it... when working on #24053 with several rebases and not reading the diff correctly caused the lines to be lost.

  9. self-assigned this
    on Jun 23, 2017
  10. modified the milestones: 10.0.3, triage on Jun 23, 2017
  11. PVince81 commented on Jun 23, 2017

    @PVince81
    Contributor

    Fix is here #28196

  12. lock commented on Aug 1, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  13. locked as resolved and limited conversation to collaborators on Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions