[Finder] Issues with the x permission not set on sub-folder #6981

Closed
vicb opened this Issue Feb 6, 2013 · 9 comments

Comments

Projects
None yet
3 participants
Contributor

vicb commented Feb 6, 2013

When a sub-folder does not have the x bit set:

  • the PhpAdapter throws an UnexpectedValueException, quite misleading,
  • the native finders only display on error on stderr (no exception).

I have discussed with @fabpot about this issue, the best would be to have a method to ignore such folders (the flag would be off by default, ie legacy behavior)

/cc @jfsimon would you have some bw to look at this ?

Contributor

jfsimon commented Feb 6, 2013

@vicb yep, i'll have time next week to implement that.

Contributor

vicb commented Feb 6, 2013

Thanks !

Contributor

vicb commented Feb 6, 2013

Some more notes:

  • The PhpAdapter fix should go in 2.0 (not really an adapter back then),
  • The native fixes should go in the release were they were introduced (2.2 IIRC),
  • The new flag should go in 2.3.
Contributor

jfsimon commented Feb 12, 2013

@vicb tell me if I understand you well:

  • a flag (let say ignoreNonPermittedDirectories) must be added
  • if flag is false, current behavior is unchanged
  • if flag is true, non openable folders are ignored by search

On native finders, should an exception be thrown if flag is false and an non openable folder is encountered?

Contributor

vicb commented Feb 12, 2013

I would introduce:

  • a PermissionException, thrown by all the finders,
  • a "ignorePermissionError" flag and fluid methods, default to false (ie current behavior)
  • when the flag is set to true non redable folders would be ignored.

@fabpot fabpot added a commit that referenced this issue Mar 23, 2013

@fabpot fabpot merged branch jfsimon/finder-access-denied-exception (PR #7256)
This PR was merged into the master branch.

Discussion
----------

[Finder] Adds AccessDeniedException

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6981

Commits
-------

714ace8 [finder] Introduced AccessDeniedException
e5be0de

fabpot closed this Mar 23, 2013

Contributor

vicb commented Mar 23, 2013

re-oprening as not solved (ony exceptions have been added)

vicb reopened this Mar 23, 2013

Contributor

jfsimon commented Mar 23, 2013

The ignoreAccessExceptions() method is missing.
@vicb Is this a good name?

Contributor

vicb commented Mar 23, 2013

I think that's a bad name. You are not ignoring the exception (ie the result) but the root cause (ie the permission error). I don't have good any names in mind ((skip|ignore)UnreadableFolders maybe)

@fabpot fabpot added a commit that referenced this issue Apr 22, 2013

@fabpot fabpot merged branch jfsimon/issue-6981 (PR #7518)
This PR was merged into the master branch.

Discussion
----------

[Finder] adds a way to ignore AccessDeniedException

This PR adds a `Finder::ignoreUnreadableDirs()` method which tells `Finder` to ignore unreadable directories instead of throwing an `AccessDeniedException`.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6981

Commits
-------

a63b30b [Finder] added Finder::ignoreUnreadableDirs() method
b58f9fd
Owner

fabpot commented Jun 13, 2013

Closing as the remaining point was fixed in #7518

fabpot closed this Jun 13, 2013

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