Adjust the Snappy open-source distribution for the changes in Google's
internal file API. R=sanjay git-svn-id: https://snappy.googlecode.com/svn/trunk@70 03e5f5b5-db94-4691-08a0-1a8bf15f6143
This commit is contained in:
@@ -46,10 +46,13 @@ string ReadTestDataFile(const string& base) {
|
||||
string contents;
|
||||
const char* srcdir = getenv("srcdir"); // This is set by Automake.
|
||||
if (srcdir) {
|
||||
File::ReadFileToStringOrDie(
|
||||
string(srcdir) + "/testdata/" + base, &contents);
|
||||
file::ReadFileToString(string(srcdir) + "/testdata/" + base,
|
||||
&contents,
|
||||
file::Defaults()).CheckSuccess();
|
||||
} else {
|
||||
File::ReadFileToStringOrDie("testdata/" + base, &contents);
|
||||
file::ReadFileToString("/testdata/" + base,
|
||||
&contents,
|
||||
file::Defaults()).CheckSuccess();
|
||||
}
|
||||
return contents;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user