diff options
author | Alexander Tkachev | 2016-08-01 13:19:16 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | dd9e5a95dc5bbae20d3da05d638139120f3113f4 (patch) | |
tree | 9cf7392598ff1d6837d6b6b4574295f1ac819f48 | |
parent | 126fe9c8457b95b13b06eb457f7ce445b031e26b (diff) | |
download | scummvm-rg350-dd9e5a95dc5bbae20d3da05d638139120f3113f4.tar.gz scummvm-rg350-dd9e5a95dc5bbae20d3da05d638139120f3113f4.tar.bz2 scummvm-rg350-dd9e5a95dc5bbae20d3da05d638139120f3113f4.zip |
CLOUD: Mark places where path handling is needed
6 files changed, 18 insertions, 0 deletions
diff --git a/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp b/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp index 53e58b4ad2..c539525820 100644 --- a/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp +++ b/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp @@ -68,6 +68,8 @@ void CreateDirectoryHandler::handle(Client &client) { return; } + // TODO: handle <path> + // check that <path> exists and is directory AbstractFSNode *node = g_system->getFilesystemFactory()->makeFileNodePath(path); if (!node->exists()) { diff --git a/backends/networking/sdl_net/handlers/downloadfilehandler.cpp b/backends/networking/sdl_net/handlers/downloadfilehandler.cpp index 295acce0ff..8f5633c6be 100644 --- a/backends/networking/sdl_net/handlers/downloadfilehandler.cpp +++ b/backends/networking/sdl_net/handlers/downloadfilehandler.cpp @@ -51,6 +51,8 @@ void DownloadFileHandler::handle(Client &client) { return; } + // TODO: handle <path> + // check that <path> exists and is directory AbstractFSNode *node = g_system->getFilesystemFactory()->makeFileNodePath(path); if (!node->exists()) { diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp index d79c9b3df7..56b0551ed7 100644 --- a/backends/networking/sdl_net/handlers/filespagehandler.cpp +++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp @@ -85,9 +85,14 @@ bool FilesPageHandler::listDirectory(Common::String path, Common::String &conten if (!transformPath(path, prefixToRemove, prefixToAdd)) return false; + // TODO: handle <path> + Common::FSNode node = Common::FSNode(path); if (path == "/") node = node.getParent(); // absolute root + + // TODO: handle <path> + if (!node.isDirectory()) return false; diff --git a/backends/networking/sdl_net/handlers/listajaxhandler.cpp b/backends/networking/sdl_net/handlers/listajaxhandler.cpp index f0bf792aa6..ad8907cf27 100644 --- a/backends/networking/sdl_net/handlers/listajaxhandler.cpp +++ b/backends/networking/sdl_net/handlers/listajaxhandler.cpp @@ -50,9 +50,14 @@ Common::JSONObject ListAjaxHandler::listDirectory(Common::String path) { if (!transformPath(path, prefixToRemove, prefixToAdd)) return errorResult; + // TODO: handle <path> + Common::FSNode node = Common::FSNode(path); if (path == "/") node = node.getParent(); // absolute root + + // TODO: handle <path> + if (!node.isDirectory()) return errorResult; diff --git a/backends/networking/sdl_net/handlers/uploadfilehandler.cpp b/backends/networking/sdl_net/handlers/uploadfilehandler.cpp index 02a7465b4a..22896a25f0 100644 --- a/backends/networking/sdl_net/handlers/uploadfilehandler.cpp +++ b/backends/networking/sdl_net/handlers/uploadfilehandler.cpp @@ -51,6 +51,8 @@ void UploadFileHandler::handle(Client &client) { return; } + // TODO: handle <path> + // check that <path> exists and is directory AbstractFSNode *node = g_system->getFilesystemFactory()->makeFileNodePath(path); if (!node->exists()) { diff --git a/backends/networking/sdl_net/uploadfileclienthandler.cpp b/backends/networking/sdl_net/uploadfileclienthandler.cpp index ee02915d6f..cbc1b7fb04 100644 --- a/backends/networking/sdl_net/uploadfileclienthandler.cpp +++ b/backends/networking/sdl_net/uploadfileclienthandler.cpp @@ -127,6 +127,8 @@ void UploadFileClientHandler::handleBlockHeaders(Client *client) { if (filename.empty()) return; + // TODO: handle <filename>, <path> + <filename> + // check that <path>/<filename> doesn't exist Common::String path = _parentDirectoryPath; if (path.lastChar() != '/' && path.lastChar() != '\\') |