Skip to content
Snippets Groups Projects
Commit 7248be4a authored by Łukasz Matysiak's avatar Łukasz Matysiak
Browse files

Reduce variable scope

parent 8c8def09
No related branches found
No related tags found
No related merge requests found
......@@ -424,8 +424,6 @@ bool Mhwd::copyDirectory(const std::string& source, const std::string& destinati
while ((dir = readdir(d)) != nullptr)
{
std::string filename {dir->d_name};
std::string sourcePath {source + "/" + filename};
std::string destinationPath {destination + "/" + filename};
if (("." == filename) || (".." == filename) || ("" == filename))
{
......@@ -433,6 +431,8 @@ bool Mhwd::copyDirectory(const std::string& source, const std::string& destinati
}
else
{
std::string sourcePath {source + "/" + filename};
std::string destinationPath {destination + "/" + filename};
lstat(sourcePath.c_str(), &filestatus);
if (S_ISREG(filestatus.st_mode))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment