From 4495626e3c06c85bdca5df136c528b370babd471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 18 Jun 2023 15:50:33 -0300 Subject: [PATCH] Allow to load files with : in their names. --- src/tools/ecode/ecode.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index a7ec3e4c8..41e6a85b2 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -34,10 +34,15 @@ App* appInstance = nullptr; static bool pathHasPosition( const std::string& path ) { #if EE_PLATFORM == EE_PLATFORM_WIN - return std::count( path.begin(), path.end(), ':' ) > 1; + bool countedSep = std::count( path.begin(), path.end(), ':' ) > 1; #else - return std::count( path.begin(), path.end(), ':' ) > 0; + bool countedSep = std::count( path.begin(), path.end(), ':' ) > 0; #endif + if ( countedSep ) { + auto seps = String::split( path, ':' ); + return String::isNumber( seps.back() ); + } + return false; } static std::pair getPathAndPosition( const std::string& path ) {