Skip to content

\OCP\Files::searchByMime returns incorrect path for shared items #4516

Closed

Description

@VicDeo

Expected behaviour

Shared item should have a valid path in \OCP\Files::searchByMime result

Actual behaviour

it has path like '/Shared/files/filename.ext' that cannot be resolved correctly

Steps to reproduce

  1. Use \OC\Files\Filesystem::getFileInfo for any shared file in \OCP\Files::searchByMime

Server configuration

not relevant

ownCloud version:
master

@MTGap

Activity

  1. MTGap commented on Aug 24, 2013

    @MTGap
    Contributor

    I believe that will be the case for any of the methods in the shared cache. I'll try to correct that in #4382

    Edit: Actually, that's not true. It's just for searchByMime.

  2. added a commit that references this issue on Aug 29, 2013
    dc91e45
  3. VicDeo commented on Jan 31, 2014

    @VicDeo
    ContributorAuthor

    Fixed in OC6

  4. VicDeo commented on Feb 3, 2014

    @VicDeo
    ContributorAuthor

    Still doesn't work properly (For shared files in subdirectories only).

    Steps:

    1. Login as A
    2. Create dir subdirectory
    3. Put a file test.odt in this directory
    4. Share the file with user B
    5. Login as B
    6. Use \OCP\Files::searchByMime('application/vnd.oasis.opendocument.text');

    Expected result:
    As user B sees it in the root of his Shared dir
    path should be 'test.odt'

    Actual result:
    path is 'dir/test.odt'

    Shared/dir/test.odt is a ticket to nowhere for B, since correct path is Shared/test.odt

  5. reopened this on Feb 3, 2014
  6. DeepDiver1975 commented on Feb 6, 2014

    @DeepDiver1975
    Contributor

    @icewind1991 @schiesbn

  7. VicDeo commented on Feb 6, 2014

    @VicDeo
    ContributorAuthor

    Fixed with #7089

  8. locked as resolved and limited conversation to collaborators on Aug 19, 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