Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
7e5da6c6
Commit
7e5da6c6
authored
Nov 16, 2024
by
salix5
Committed by
GitHub
Nov 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warning -Wformat-truncation (#2613)
parent
79be003f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
gframe/myfilesystem.h
gframe/myfilesystem.h
+9
-3
No files found.
gframe/myfilesystem.h
View file @
7e5da6c6
...
...
@@ -174,8 +174,12 @@ public:
static
bool
DeleteDir
(
const
char
*
dir
)
{
bool
success
=
true
;
TraversalDir
(
dir
,
[
dir
,
&
success
](
const
char
*
name
,
bool
isdir
)
{
char
full_path
[
256
];
snprintf
(
full_path
,
sizeof
full_path
,
"%s/%s"
,
dir
,
name
);
char
full_path
[
1024
];
int
len
=
std
::
snprintf
(
full_path
,
sizeof
full_path
,
"%s/%s"
,
dir
,
name
);
if
(
len
<
0
||
len
>=
(
int
)(
sizeof
full_path
))
{
success
=
false
;
return
;
}
if
(
isdir
)
{
if
(
!
DeleteDir
(
full_path
))
...
...
@@ -207,7 +211,9 @@ public:
while
((
dirp
=
readdir
(
dir
))
!=
nullptr
)
{
file_unit
funit
;
char
fname
[
1024
];
std
::
snprintf
(
fname
,
sizeof
fname
,
"%s/%s"
,
path
,
dirp
->
d_name
);
int
len
=
std
::
snprintf
(
fname
,
sizeof
fname
,
"%s/%s"
,
path
,
dirp
->
d_name
);
if
(
len
<
0
||
len
>=
(
int
)(
sizeof
fname
))
continue
;
stat
(
fname
,
&
fileStat
);
funit
.
filename
=
std
::
string
(
dirp
->
d_name
);
funit
.
is_dir
=
S_ISDIR
(
fileStat
.
st_mode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment