From e0b50b400283b4f7add5eed5e4347445f9fbc8bc Mon Sep 17 00:00:00 2001 From: Cirilo Bernardo Date: Mon, 11 Jan 2016 16:24:51 +1100 Subject: [PATCH] Ensuring consistent internal kicad file separator character on MSWin --- 3d-viewer/3d_cache/3d_filename_resolver.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/3d-viewer/3d_cache/3d_filename_resolver.cpp b/3d-viewer/3d_cache/3d_filename_resolver.cpp index b4a885045c..cbd7f56e37 100644 --- a/3d-viewer/3d_cache/3d_filename_resolver.cpp +++ b/3d-viewer/3d_cache/3d_filename_resolver.cpp @@ -463,6 +463,14 @@ wxString S3D_FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName ) ++sL; } +#ifdef _WIN32 + // it is strange to convert an MSWin full path to use the + // UNIX separator but this is done for consistency and can + // be helpful even when transferring project files from + // MSWin to *NIX. + fname.Replace( wxT( "\\" ), wxT( "/" ) ); +#endif + return fname; }