[haiku-commits] haiku: hrev53327 - in src: apps/screenshot apps/mediaconverter kits/tracker

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 2 Aug 2019 00:31:46 -0400 (EDT)

hrev53327 adds 1 changeset to branch 'master'
old head: 925d9f1909d43f4f31661bf8134761d036ebc887
new head: ecba7b5c7ed271b1f5b7d13e42f0ea2e85a5d4d8
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=ecba7b5c7ed2+%5E925d9f1909d4

----------------------------------------------------------------------------

ecba7b5c7ed2: Tracker: Ensure loading the Node works before passing to a Filter
  
  Checking errors is important. This properly fixes #10365 and resolves a few
  TODOs.
  
  This DirectoryFilter is also used in Expander, though with a lower level
  implementation that did not trigger this bug. This feels like it could be
  in the the Tracker or shared kit.
  
  Change-Id: Icd2ddc241c1879a7c4235726bf089570ba00dc0a
  Reviewed-on: https://review.haiku-os.org/c/1672
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                  [ Ryan Leavengood <leavengood@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53327
Commit:      ecba7b5c7ed271b1f5b7d13e42f0ea2e85a5d4d8
URL:         https://git.haiku-os.org/haiku/commit/?id=ecba7b5c7ed2
Author:      Ryan Leavengood <leavengood@xxxxxxxxx>
Date:        Thu Aug  1 23:18:37 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/10365

----------------------------------------------------------------------------

3 files changed, 4 insertions(+), 13 deletions(-)
src/apps/mediaconverter/MediaConverterWindow.cpp | 7 +------
src/apps/screenshot/ScreenshotWindow.cpp         | 7 +------
src/kits/tracker/PoseView.cpp                    | 3 ++-

----------------------------------------------------------------------------

diff --git a/src/apps/mediaconverter/MediaConverterWindow.cpp 
b/src/apps/mediaconverter/MediaConverterWindow.cpp
index 3530f89284..e223595948 100644
--- a/src/apps/mediaconverter/MediaConverterWindow.cpp
+++ b/src/apps/mediaconverter/MediaConverterWindow.cpp
@@ -58,12 +58,7 @@ public:
        virtual bool Filter(const entry_ref* ref,
                BNode* node, struct stat_beos* st, const char* filetype)
        {
-               // ToDo: Fix this properly in Tracker
-               // If you create a folder, then rename it, node is NULL.
-               // The BeBook says: "Note that the function is never sent an
-               // abstract entry, so the node, st, and filetype arguments will
-               // always be valid."
-               return node == NULL ? false : node->IsDirectory();
+               return node->IsDirectory();
        }
 };
 
diff --git a/src/apps/screenshot/ScreenshotWindow.cpp 
b/src/apps/screenshot/ScreenshotWindow.cpp
index f12b808329..ecfcd4bc1b 100644
--- a/src/apps/screenshot/ScreenshotWindow.cpp
+++ b/src/apps/screenshot/ScreenshotWindow.cpp
@@ -99,12 +99,7 @@ public:
        virtual bool Filter(const entry_ref* ref, BNode* node,
                struct stat_beos* stat, const char* filetype)
        {
-               // ToDo: Fix this properly in Tracker
-               // If you create a folder, then rename it, node is NULL.
-               // The BeBook says: "Note that the function is never sent an
-               // abstract entry, so the node, st, and filetype arguments will
-               // always be valid."
-               return node == NULL ? false : node->IsDirectory();
+               return node->IsDirectory();
        }
 };
 
diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index 8dcf25f507..4dd193e153 100644
--- a/src/kits/tracker/PoseView.cpp
+++ b/src/kits/tracker/PoseView.cpp
@@ -10334,7 +10334,8 @@ BPoseView::FilterPose(BPose* pose)
        if (fRefFilter != NULL) {
                PoseInfo poseInfo;
                ReadPoseInfo(pose->TargetModel(), &poseInfo);
-               pose->TargetModel()->OpenNode();
+               if (pose->TargetModel()->OpenNode() != B_OK)
+                       return false;
                if (!ShouldShowPose(pose->TargetModel(), &poseInfo))
                        return false;
        }


Other related posts:

  • » [haiku-commits] haiku: hrev53327 - in src: apps/screenshot apps/mediaconverter kits/tracker - Ryan Leavengood