From 7987b5c66b4bddbda1ade82d958c2f4e55addcd6 Mon Sep 17 00:00:00 2001
From: "Paul \"Dettorer\" Hervot"
Date: Sun, 29 Nov 2015 08:46:56 +0100
Subject: [PATCH] File_util: Fix parameter shadowing
---
src/common/file_util.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index cdc6bbdbc..13ea71a19 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -475,11 +475,11 @@ bool ForeachDirectoryEntry(unsigned* num_entries_out, const std::string &directo
unsigned ScanDirectoryTree(const std::string &directory, FSTEntry& parent_entry)
{
const auto callback = [&parent_entry](unsigned* num_entries_out,
- const std::string& directory,
+ const std::string& _directory,
const std::string& virtual_name) -> bool {
FSTEntry entry;
entry.virtualName = virtual_name;
- entry.physicalName = directory + DIR_SEP + virtual_name;
+ entry.physicalName = _directory + DIR_SEP + virtual_name;
if (IsDirectory(entry.physicalName)) {
entry.isDirectory = true;
@@ -505,9 +505,9 @@ unsigned ScanDirectoryTree(const std::string &directory, FSTEntry& parent_entry)
bool DeleteDirRecursively(const std::string &directory)
{
const static auto callback = [](unsigned* num_entries_out,
- const std::string& directory,
+ const std::string& _directory,
const std::string& virtual_name) -> bool {
- std::string new_path = directory + DIR_SEP_CHR + virtual_name;
+ std::string new_path = _directory + DIR_SEP_CHR + virtual_name;
if (IsDirectory(new_path))
return DeleteDirRecursively(new_path);