From 59cb258409c5cbd6cdc9cc6a6f8e858603924a2b Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 23 Jul 2018 22:40:35 -0400 Subject: VFS Regression and Accuracy Fixes (#776) * Regression and Mode Fixes * Review Fixes * string_view correction * Add operator& for FileSys::Mode * Return std::string from SanitizePath * Farming Simulator Fix * Use != With mode operator& --- src/common/file_util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common/file_util.h') diff --git a/src/common/file_util.h b/src/common/file_util.h index abfa79eae..bc9272d89 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -178,6 +178,9 @@ std::vector SliceVector(const std::vector& vector, size_t first, size_t la return std::vector(vector.begin() + first, vector.begin() + first + last); } +// Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. +std::string SanitizePath(std::string_view path); + // simple wrapper for cstdlib file functions to // hopefully will make error checking easier // and make forgetting an fclose() harder -- cgit v1.2.3