diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-28 00:54:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-28 00:54:28 +0300 |
commit | 6ebd6c0f16cf15bb455b81ca571ef88bac381655 (patch) | |
tree | 2be6a21600c7e0f8c0067c494e2510d6f3c0129c /src/fs/virtfsdir.h | |
parent | eb5128aa6ce4a33aa9021b51231d0934294c7caa (diff) | |
download | manaverse-6ebd6c0f16cf15bb455b81ca571ef88bac381655.tar.gz manaverse-6ebd6c0f16cf15bb455b81ca571ef88bac381655.tar.bz2 manaverse-6ebd6c0f16cf15bb455b81ca571ef88bac381655.tar.xz manaverse-6ebd6c0f16cf15bb455b81ca571ef88bac381655.zip |
Add path sanitization in virtfsdir.
Diffstat (limited to 'src/fs/virtfsdir.h')
-rw-r--r-- | src/fs/virtfsdir.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fs/virtfsdir.h b/src/fs/virtfsdir.h index 0f36b1241..8ea825d82 100644 --- a/src/fs/virtfsdir.h +++ b/src/fs/virtfsdir.h @@ -40,9 +40,9 @@ namespace VirtFsDir VirtDirEntry *searchEntryByPath(const std::string &restrict path); const char *getBaseDir(); const char *getUserDir(); - bool addToSearchPath(const std::string &newDir, + bool addToSearchPath(std::string newDir, const Append append); - bool addToSearchPathSilent(const std::string &newDir, + bool addToSearchPathSilent(std::string newDir, const Append append, const SkipError skipError); bool removeFromSearchPath(std::string oldDir); @@ -51,18 +51,18 @@ namespace VirtFsDir void initFuncs(VirtFsFuncs *restrict const ptr); void deinit(); std::vector<VirtDirEntry*> &getEntries(); - bool exists(const std::string &restrict name); - VirtList *enumerateFiles(const std::string &restrict dir) RETURNS_NONNULL; - bool isDirectory(const std::string &restrict dirName); - bool isSymbolicLink(const std::string &restrict name); + bool exists(std::string name); + VirtList *enumerateFiles(std::string dir) RETURNS_NONNULL; + bool isDirectory(std::string dirName); + bool isSymbolicLink(std::string name); void freeList(VirtList *restrict const handle); VirtFile *openRead(const std::string &restrict filename); VirtFile *openWrite(const std::string &restrict filename); VirtFile *openAppend(const std::string &restrict filename); - bool setWriteDir(const std::string &restrict newDir); - std::string getRealDir(const std::string &restrict filename); - bool mkdir(const std::string &restrict dirName); - bool remove(const std::string &restrict filename); + bool setWriteDir(std::string newDir); + std::string getRealDir(std::string filename); + bool mkdir(std::string dirName); + bool remove(std::string filename); void permitLinks(const bool val); const char *getLastError(); int64_t read(VirtFile *restrict const handle, |