Skip to content

Commit 5e7699f

Browse files
authored
fix access denied error (#142)
1 parent 87466ee commit 5e7699f

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ To install or update LODA, please follow the [installation instructions](https:/
22

33
## [Unreleased]
44

5+
### Bugfixes
6+
7+
* Fix "access denied" error during stats generation on Windows.
8+
59
# v22.5.14
610

711
### Bugfixes

src/file.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ std::string getPath() {
8989
void execCmd(const std::string &cmd) {
9090
auto exit_code = system(cmd.c_str());
9191
if (exit_code != 0) {
92-
Log::get().info("PATH=" + getPath());
9392
Log::get().error("Error executing command (exit code " +
9493
std::to_string(exit_code) + "): " + cmd,
9594
true);

src/stats.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ void Stats::collectLatestProgramIds() {
398398
}
399399
const std::string git_tmp = getTmpDir() + "loda_git_tmp.txt";
400400
git(progs_dir, "log --oneline --format=\"%H\" -n " +
401-
std::to_string(max_commits) + " > " + git_tmp);
401+
std::to_string(max_commits) + " > \"" + git_tmp + "\"");
402402
std::string line;
403403
std::vector<std::string> commits;
404404
{
@@ -423,7 +423,7 @@ void Stats::collectLatestProgramIds() {
423423
break;
424424
}
425425
git(progs_dir, "diff-tree --no-commit-id --name-status -r " + commit +
426-
" > " + git_tmp);
426+
" > \"" + git_tmp + "\"");
427427
{
428428
// read changed file names from file
429429
std::ifstream in(git_tmp);

0 commit comments

Comments
 (0)