diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-09-05 20:08:51 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2015-05-16 18:32:31 -0400 |
commit | 3a8c7888807e4483bbdb3edd81c9893f3e2f427d (patch) | |
tree | 81f339e5f61b03e8d7842e06f034d09bf59dba96 /src/filesys.h | |
parent | f26421228bbd31f02bf16b45a4b82be84f233e52 (diff) | |
download | minetest-3a8c7888807e4483bbdb3edd81c9893f3e2f427d.tar.gz minetest-3a8c7888807e4483bbdb3edd81c9893f3e2f427d.tar.bz2 minetest-3a8c7888807e4483bbdb3edd81c9893f3e2f427d.zip |
Add mod security
Due to compatibility concerns, this is temporarily disabled.
Diffstat (limited to 'src/filesys.h')
-rw-r--r-- | src/filesys.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/filesys.h b/src/filesys.h index 7560d3c15..19fcbb673 100644 --- a/src/filesys.h +++ b/src/filesys.h @@ -103,13 +103,17 @@ std::string RemoveLastPathComponent(const std::string &path, // this does not resolve symlinks and check for existence of directories. std::string RemoveRelativePathComponents(std::string path); -// Return the filename from a path or the entire path if no directory delimiter -// is found. +// Returns the absolute path for the passed path, with "." and ".." path +// components and symlinks removed. Returns "" on error. +std::string AbsolutePath(const std::string &path); + +// Returns the filename from a path or the entire path if no directory +// delimiter is found. const char *GetFilenameFromPath(const char *path); bool safeWriteToFile(const std::string &path, const std::string &content); -}//fs +} // namespace fs #endif |