Skip to content

By renaming a shared folder is not shared any more #2170

Description

@rperezb

Expected behaviour

Having one folder shared, if it is renamed on the shared user should be renamed too.

Actual behaviour

By renaming it, it is not any longer shared.

Steps to reproduce

  1. Being registered as user1 we share with user2 a folder called A
  2. From user1, we rename the folder to A2, it is still shown the "shared" icon, however, by accessing to it, it is not displayed the info about with whom it is shared.
  3. By accessing to user2 account, we notice that the A folder has disappear, neither the A2 folder is displayed.

Server configuration

acceptance-testing master_on_apache_with_sqlite
"version":"4.96.10","versionstring":"5.0 RC 2"

Client configuration

Browser: Firefox and chrome

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:50
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:49
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:49
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:50
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:49
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:49
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:40
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:38
Error   files_sharing   File source not found for: /test (2)/otra desde user1   March 7, 2013 16:38
Error   files_sharing   File source not found for: /test (2)/otra desde user1   March 7, 2013 16:38
Error   files_sharing   File source not found for: /test (2)/otra desde user1   March 7, 2013 16:38
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:38
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:38

Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:50
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:50
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:50
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:51
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:51
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:51
Error   search_lucene   need mimetype for content extraction    March 7, 2013 16:50
Debug   core    include path for class "OC_Search_Lucene_Indexer" starts with "apps/"   March 7, 2013 16:50
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:50
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:50
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:50
Debug   core    include path for class "OCA_FirstRunWizard\Config" starts with "apps/"  March 7, 2013 16:50
Debug   core    Adding user backend instance of OC_User_Database.   March 7, 2013 16:50

Activity

  1. MTGap commented on Mar 7, 2013

    @MTGap
    Contributor

    @icewind1991 I'm suspecting the file id is changing during the rename. Why is this happening?

  2. rperezb commented on Mar 26, 2013

    @rperezb
    Author

    It does not work.

    Checked on:

    Server configuration

    version":"4.97.10","versionstring":"5.0 RC 3
    Open Suse 12.2

    Logs

    ownCloud log (data/owncloud.log)

    Warning PHP filemtime(): stat failed for /srv/www/htdocs/owncloud/data/user1/files/üser& at /srv/www/htdocs/owncloud/lib/files/storage/local.php#92    March 26, 2013 13:43
    
  3. MTGap commented on Apr 8, 2013

    @MTGap
    Contributor

    @icewind1991 I was able to track down the problem.

    The file updater listens to the rename hook and correctly renames the file to the new name without changing the id. The shared updater also listens to the rename hook and it calls getFileInfo on the new path as well as the old path's folder to get the file id. This causes the cleanFolder to be called in the file watcher which removes the renamed row from the file cache and then the file gets scanned again. I'm not sure how to fix this.

    By the way, all files are getting rescanned in the folder that a file is renamed in.

  4. rperezb commented on Apr 18, 2013

    @rperezb
    Author

    Fixed, checked with "version":"5.0.6","versionstring":"5.0.5 RC1"

    Browsers:

    • Firefox
    • Chrome
    • IE9
  5. locked as resolved and limited conversation to collaborators on Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions