]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Update deprecation-warning.cpp (#10619)
authoraryantandon01 <redacted>
Wed, 4 Dec 2024 22:19:20 +0000 (03:49 +0530)
committerGitHub <redacted>
Wed, 4 Dec 2024 22:19:20 +0000 (23:19 +0100)
Fixed Path Separator Handling for Cross-Platform Support (Windows File Systems)

examples/deprecation-warning/deprecation-warning.cpp

index 11b35d2c22500bf150bdc542d10d6c77ac12abb4..c2958ea12d92d60d89cded4e6850ec20e121515a 100644 (file)
@@ -12,7 +12,7 @@ int main(int argc, char** argv) {
     }
 
     // Get only the program name from the full path
-    auto pos = filename.find_last_of('/');
+    auto pos = filename.find_last_of("/\\");
     if (pos != std::string::npos) {
         filename = filename.substr(pos+1);
     }