From 120cfce002bb805b790506b9fa983d8a619f5836 Mon Sep 17 00:00:00 2001
From: whh8b <whh8b@git.zephyr-software.com>
Date: Thu, 22 Oct 2015 15:59:22 +0000
Subject: [PATCH] Plugin man should not warn about cwd and pwd not having .zpi
 extensions.

---
 src/plugin_man.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/plugin_man.cpp b/src/plugin_man.cpp
index 9c6fb3602..eab42e0b9 100644
--- a/src/plugin_man.cpp
+++ b/src/plugin_man.cpp
@@ -124,11 +124,16 @@ void ZiprPluginManager_t::open_plugins
 
     	while ((dirp = readdir(dp)) != NULL) 
 	{
-        	string name=dir+string(dirp->d_name);
+		string basename = string(dirp->d_name);
+		string name=dir+basename;
 		string zpi(".zpi");
-
 		string extension=name.substr(name.size() - zpi.length());
-		if(extension!=zpi)
+
+		// Automatically skip cwd and pwd entries.
+		if(basename == "." || basename == "..")
+			continue;
+
+		if (extension!=zpi)
 		{
 			cout<<"File ("<<name<<") does not have proper extension, skipping."<<endl;
 			continue; // try next file
-- 
GitLab