aboutsummaryrefslogtreecommitdiff
path: root/src/common/file_util.h
diff options
context:
space:
mode:
authorZach Hilman <DarkLordZach@users.noreply.github.com>2018-07-23 22:40:35 -0400
committerbunnei <bunneidev@gmail.com>2018-07-23 19:40:35 -0700
commit59cb258409c5cbd6cdc9cc6a6f8e858603924a2b (patch)
treec024d285fe63daae9d73ef07800349a065768672 /src/common/file_util.h
parentf6657bc8d78c19d41cf64e6c0086f862b4b9a515 (diff)
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&
Diffstat (limited to 'src/common/file_util.h')
-rw-r--r--src/common/file_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h
index abfa79eaea..bc9272d89d 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -178,6 +178,9 @@ std::vector<T> SliceVector(const std::vector<T>& vector, size_t first, size_t la
return std::vector<T>(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