add 'write-to-user' permission & refactor checking for writeability
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
#include <set>
|
||||
|
||||
struct PathsRoot {
|
||||
std::string name;
|
||||
@@ -42,6 +43,8 @@ private:
|
||||
std::vector<PathsRoot> roots;
|
||||
};
|
||||
|
||||
struct Project;
|
||||
|
||||
class EnginePaths {
|
||||
public:
|
||||
ResPaths resPaths;
|
||||
@@ -65,6 +68,10 @@ public:
|
||||
|
||||
void setEntryPoints(std::vector<PathsRoot> entryPoints);
|
||||
|
||||
void setupProject(const Project& project);
|
||||
|
||||
bool isWriteable(const std::string& entryPoint) const;
|
||||
|
||||
std::vector<io::path> scanForWorlds() const;
|
||||
|
||||
static std::tuple<std::string, std::string> parsePath(std::string_view view);
|
||||
@@ -81,6 +88,7 @@ private:
|
||||
std::vector<PathsRoot> entryPoints;
|
||||
std::unordered_map<std::string, std::string> writeables;
|
||||
std::vector<std::string> mounted;
|
||||
std::set<std::string> initiallyWriteables;
|
||||
|
||||
void cleanup();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user