Review main Merged

26466[BUGFIX] File browser fails on inexistent expandFolder

Mario Rimann CR +2 V +2 Easy +9 −1 updated 01/16/14, 18:27

Commit message

If a user browsed to a directory "foo" and re-opens the file-
browser later, the same directory is shown expanded.

In case the directory has been moved/renamed/deleted in the
meantime, the user gets an exception due to the inexistent
directory.

This change just adds a try/catch block around to handle that
situation.

Review

  • Code review CR +2
    • Steffen Ritter +2
    • Wouter Wolters +1
    • Markus Klein +1
    • Pascal Maechler +1
  • Verified V +2
    • Steffen Ritter +2
    • Wouter Wolters +1
    • Markus Klein +1

Issues 1

Files 1

Review log 18

  1. Mario Rimann uploaded patch set 2 12/18/13, 09:21

  2. Mr. Jenkins commented on patch set 1 12/18/13, 09:30

  3. Mr. Jenkins commented on patch set 2 12/18/13, 09:36

  4. Markus Klein updated the commit message in patch set 2 12/18/13, 09:44

  5. Mr. Jenkins commented on patch set 3 12/18/13, 09:58

  6. Markus Klein voted on patch set 3 V +1 CR +1 12/18/13, 10:10

  7. Pascal Maechler voted on patch set 3 CR +1 12/18/13, 10:43

  8. Wouter Wolters wrote 01/08/14, 19:27

    Topic set to "fal".
  9. Wouter Wolters commented on patch set 3 V +1 CR +1 01/08/14, 19:31

    This solves the problem but I want to let Steffen Ritter have a look at it, Just a try catch somewhere where it should just return a NULL value IMO
  10. Markus Klein commented on patch set 3 01/08/14, 21:02

    You mean ResourceFactory::getObjectFromCombinedIdentifier() should return NULL instead of throwing the exception? There are two other exceptions FolderDoesNotExistException and FileDoesNotExistException which extend ResourceDoesNotExistException
  11. Steffen Ritter commented on patch set 3 01/09/14, 08:12

    in 6.2 wie could do go one level up until we have a folder... what do you think?
  12. Steffen Ritter commented on patch set 3 01/09/14, 08:13

    @Wouter exceptions from the API are correct, you wanna react on that programmatically in your own code - UI just has to behave gracefully
  13. Frans Saris commented on patch set 3 01/09/14, 08:15

    +1 for Steffen's idea
  14. Mario Rimann commented on patch set 3 01/09/14, 08:17

    I'm for keeping the bugfix as simple as possible: just catch the Exception and show the user the tree with no folder selected (IMO this would be again the pre-FAL behaviour). Benefit of this is, that the patch can be applied 1:1 to 6.1 and 6.0 I guess. Of course, we could add the proposed parent-folder-select, but I consider this a change of functionality -> it's a feature.
  15. Steffen Ritter commented on patch set 3 V +2 CR +2 01/09/14, 08:19

    agreed to Mario, Mario mind taking care of backports?
  16. Steffen Ritter merged patch set 4 01/09/14, 08:19

  17. Mario Rimann commented on patch set 4 01/09/14, 08:21

    I'll follow up on this one soonish, thanks for merging!
  18. Markus Klein commented on patch set 4 01/16/14, 18:27

    Cherry Picked This patchset was cherry picked to change: I39aab6be46aec1d3f1f365e5d5f5455aca9b3aa2