Merge "close stream after use" into udc-dev

This commit is contained in:
Adam Shih 2023-03-02 22:22:38 +00:00 committed by Android (Google) Code Review
commit 1692bc1028

View file

@ -98,6 +98,8 @@ void copyFile(const char* SrcDir, const char* DestDir) {
std::ifstream src(SrcDir, std::ios::binary);
std::ofstream dst(DestDir, std::ios::binary);
dst << src.rdbuf();
src.close();
dst.close();
return;
}