[Packagemanager] Check the package list is empty (#1907)
authorjeremy-jang <35089715+jeremy-jang@users.noreply.github.com>
Mon, 10 Aug 2020 08:15:59 +0000 (17:15 +0900)
committerGitHub <noreply@github.com>
Mon, 10 Aug 2020 08:15:59 +0000 (17:15 +0900)
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs

index 9d3e6c0..77fc6ac 100755 (executable)
@@ -18,6 +18,7 @@ using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
 using System.IO;
+using System.Linq;
 
 namespace Tizen.Applications
 {
@@ -643,7 +644,7 @@ namespace Tizen.Applications
 
         private static bool InstallInternal(List<string> packagePaths, string expansionPackagePath, PackageType type, RequestEventCallback eventCallback, InstallationMode installMode)
         {
-            if (packagePaths == null)
+            if (packagePaths == null || !packagePaths.Any())
             {
                 Log.Warn(LogTag, string.Format("Invalid argument"));
                 return false;