You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/01/31 09:03:04 UTC

[GitHub] [nifi-minifi-cpp] fgerlits commented on a change in pull request #1251: MINIFICPP-1636 - Use std::filesystem instead of boost and platform specific implementations

fgerlits commented on a change in pull request #1251:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1251#discussion_r795447490



##########
File path: extensions/script/python/PythonCreator.h
##########
@@ -143,19 +142,15 @@ class PythonCreator : public minifi::core::CoreComponent {
   }
 
   std::string getPath(const std::string &pythonscript) {
-    std::string path = pythonscript.substr(0, pythonscript.find_last_of("/\\"));
-    return path;
+    return std::filesystem::path(pythonscript).parent_path();

Review comment:
       I think we need `.string()` at the end here for this to compile on Windows.  (Also in `getScriptName()`.)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org