mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-20 22:11:39 +02:00
Merge pull request #933 from vcaputo/readfiletostring_clearfirst
libchrome: Fix append bug in file_util::ReadFileToString()
This commit is contained in:
commit
c60f3b2faa
@ -0,0 +1,11 @@
|
|||||||
|
--- a/file_util.cc 2014-10-21 19:09:47.052101527 -0400
|
||||||
|
+++ b/file_util.cc 2014-10-21 19:22:00.619134259 -0400
|
||||||
|
@@ -152,6 +152,8 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReadFileToString(const FilePath& path, std::string* contents) {
|
||||||
|
+ if (contents)
|
||||||
|
+ contents->clear();
|
||||||
|
if (path.ReferencesParent())
|
||||||
|
return false;
|
||||||
|
FILE* file = OpenFile(path, "rb");
|
@ -42,6 +42,7 @@ src_prepare() {
|
|||||||
|
|
||||||
epatch "${FILESDIR}"/base-125070-no-X.patch
|
epatch "${FILESDIR}"/base-125070-no-X.patch
|
||||||
epatch "${FILESDIR}"/base-125070-x32.patch
|
epatch "${FILESDIR}"/base-125070-x32.patch
|
||||||
|
epatch "${FILESDIR}"/readfiletostring_clearfirst.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user