diff options
| author | Mat M <mathew1800@gmail.com> | 2016-12-25 16:48:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-25 16:48:17 -0500 |
| commit | d1defd71df6bc63b46fa6c8caa124954f633fd12 (patch) | |
| tree | 7cda8109eae7633a401bd1f10aceacac8a44fac1 /Source/Core | |
| parent | 190c6218ab3785db75a3a10bf1b4c2fd7b367ceb (diff) | |
| parent | e56bec9c87cd4842c945411caf9726d246acc65c (diff) | |
Merge pull request #4557 from JosJuice/scandirectorytree-comments
Fix outdated comments in ScanDirectoryTree
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/Common/FileUtil.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index e761f3ade1..2a70b6dfe0 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -439,12 +439,10 @@ bool CreateEmptyFile(const std::string& filename) return true; } -// Scans the directory tree gets, starting from _Directory and adds the -// results into parentEntry. Returns the number of files+directories found +// Recursive or non-recursive list of files and directories under directory. FSTEntry ScanDirectoryTree(const std::string& directory, bool recursive) { INFO_LOG(COMMON, "ScanDirectoryTree: directory %s", directory.c_str()); - // How many files + directories we found FSTEntry parent_entry; parent_entry.physicalName = directory; parent_entry.isDirectory = true; @@ -505,7 +503,7 @@ FSTEntry ScanDirectoryTree(const std::string& directory, bool recursive) } closedir(dirp); #endif - // Return number of entries found. + return parent_entry; } diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h index f4a20f623d..1c38bb38d9 100644 --- a/Source/Core/Common/FileUtil.h +++ b/Source/Core/Common/FileUtil.h @@ -112,7 +112,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename); // creates an empty file filename, returns true on success bool CreateEmptyFile(const std::string& filename); -// Recursive or non-recursive list of files under directory. +// Recursive or non-recursive list of files and directories under directory. FSTEntry ScanDirectoryTree(const std::string& directory, bool recursive); // deletes the given directory and anything under it. Returns true on success. |
