Change --ni-dir option operation
authorWoongsuk Cho <ws77.cho@samsung.com>
Wed, 29 Jun 2022 05:36:17 +0000 (14:36 +0900)
committer조웅석/Common Platform Lab(SR)/삼성전자 <ws77.cho@samsung.com>
Wed, 29 Jun 2022 22:44:18 +0000 (07:44 +0900)
if the --inputbubble option and --ni-dir option used together, all input directories must be processed as one bubble.
For this requirements, change implementation of --ni-dir option.

NativeLauncher/tool/dotnettool.cc

index e145699..8c10ce4 100644 (file)
@@ -250,15 +250,17 @@ int main(int argc, char* argv[])
                if (args.size() < 1) {
                        _SERR("Directory path is missing");
                }
+               std::string dir;
                while (it != args.end()) {
-                       const std::string dir = std::string(*it);
-                       int ret = createNIUnderDirs(dir, opt);
-                       if (ret != NI_ERROR_NONE) {
-                               _SERR("Failed to generate NI directory");
-                               break;
+                       if (!dir.empty()) {
+                               dir += std::string(":");
                        }
+                       dir += std::string(*it);
                        it = args.erase(it);
                }
+               if (createNIUnderDirs(dir, opt) != NI_ERROR_NONE) {
+                       _SERR("Failed to generate NI directory");
+               }
        }
        //sh-3.2# dotnettool --ni-reset-system
        else if (cmd == "--ni-reset-system") {