diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 4e01590805..7b648ead8f 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -78,8 +78,8 @@ bool DirectoryFileSystem::RenameFile(const std::string &from, const std::string std::string fullTo = to; // TO filename may not include path. Intention is that it uses FROM's path if (to.find("/") != std::string::npos) { - int offset = from.find_last_of("/"); - if (offset >= 0) { + size_t offset = from.find_last_of("/"); + if (offset != std::string::npos) { fullTo = from.substr(0, offset + 1) + to; } }