Forráskód Böngészése

#修改windows dump bug

zxs 1 napja
szülő
commit
997eb9aacc
1 módosított fájl, 1 hozzáadás és 3 törlés
  1. 1 3
      robot/robotics/dump.hpp

+ 1 - 3
robot/robotics/dump.hpp

@@ -79,9 +79,7 @@ namespace robotics {
             }
             static std::string get_dump_file_name() {
                 std::string currentTime = v3::datetime::current_datetime().to_string("yyyy_MM_dd_HH_mm_ss_fff");
-                char filename[512] = { 0 };
-                GetModuleFileNameA(NULL, filename, 512);
-                std::filesystem::path path = filename;
+                std::filesystem::path path = std::filesystem::current_path();
                 path /= "dump";
                 if (!std::filesystem::exists(path)) {
                     std::filesystem::create_directory(path);