Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dhtnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
dhtnet
Commits
82940483
Commit
82940483
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
fileutils: cleanup
Change-Id: Id5299c98a4b2a173cffe6c93b62519ed23e29a35
parent
668af232
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fileutils.cpp
+1
-7
1 addition, 7 deletions
src/fileutils.cpp
with
1 addition
and
7 deletions
src/fileutils.cpp
+
1
−
7
View file @
82940483
...
...
@@ -185,10 +185,7 @@ readDirectory(const std::filesystem::path& dir)
std
::
vector
<
std
::
string
>
files
;
std
::
error_code
ec
;
for
(
const
auto
&
entry
:
std
::
filesystem
::
directory_iterator
(
dir
,
ec
))
{
std
::
string
fname
{
entry
.
path
().
filename
().
string
()};
if
(
fname
==
"."
||
fname
==
".."
)
continue
;
files
.
emplace_back
(
std
::
move
(
fname
));
files
.
emplace_back
(
entry
.
path
().
filename
().
string
());
}
return
files
;
}
...
...
@@ -342,9 +339,6 @@ removeAll(const std::filesystem::path& path, bool erase)
auto
status
=
std
::
filesystem
::
status
(
path
);
if
(
std
::
filesystem
::
is_directory
(
status
)
and
not
std
::
filesystem
::
is_symlink
(
status
))
{
for
(
const
auto
&
entry
:
std
::
filesystem
::
directory_iterator
(
path
))
{
auto
fname
=
entry
.
path
().
filename
().
string
();
if
(
fname
==
"."
||
fname
==
".."
)
continue
;
removeAll
(
entry
.
path
(),
erase
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment