Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/DefaultFileSystem.cpp

Issue 10805001: Fixed: FileSystem;:Write should take an istream instance for input, not ostream (Closed)
Patch Set: Created May 24, 2013, 9:35 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/AdblockPlus/FileSystem.h ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/DefaultFileSystem.cpp
===================================================================
--- a/src/DefaultFileSystem.cpp
+++ b/src/DefaultFileSystem.cpp
@@ -68,17 +68,17 @@ namespace
std::tr1::shared_ptr<std::istream>
DefaultFileSystem::Read(const std::string& path) const
{
return std::tr1::shared_ptr<std::istream>(new std::ifstream(NormalizePath(path).c_str()));
}
void DefaultFileSystem::Write(const std::string& path,
- std::tr1::shared_ptr<std::ostream> data)
+ std::tr1::shared_ptr<std::istream> data)
{
std::ofstream file(NormalizePath(path).c_str());
file << Utils::Slurp(*data);
}
void DefaultFileSystem::Move(const std::string& fromPath,
const std::string& toPath)
{
« no previous file with comments | « include/AdblockPlus/FileSystem.h ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld