Merge "close stream after use" into udc-dev
This commit is contained in:
commit
1692bc1028
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue