From: aryantandon01 Date: Wed, 4 Dec 2024 22:19:20 +0000 (+0530) Subject: Update deprecation-warning.cpp (#10619) X-Git-Tag: upstream/0.0.4488~220 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=f112d198cd9953b633ac662c2705d6e423438717;p=pkg%2Fggml%2Fsources%2Fllama.cpp Update deprecation-warning.cpp (#10619) Fixed Path Separator Handling for Cross-Platform Support (Windows File Systems) --- diff --git a/examples/deprecation-warning/deprecation-warning.cpp b/examples/deprecation-warning/deprecation-warning.cpp index 11b35d2c..c2958ea1 100644 --- a/examples/deprecation-warning/deprecation-warning.cpp +++ b/examples/deprecation-warning/deprecation-warning.cpp @@ -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); }