Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
e3506c0f
Commit
e3506c0f
authored
Feb 17, 2022
by
longpanda
Browse files
Add cmdline check
parent
9118d5fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
Vlnk/src/main_windows.c
Vlnk/src/main_windows.c
+15
-8
Vlnk/vs/VentoyVlnk/Release/VentoyVlnk.exe
Vlnk/vs/VentoyVlnk/Release/VentoyVlnk.exe
+0
-0
No files found.
Vlnk/src/main_windows.c
View file @
e3506c0f
...
...
@@ -393,12 +393,12 @@ static BOOL IsSupportedVlnkSuffix(WCHAR *FileName)
if
(
len
>
9
)
{
if
(
lstrcmp
(
FileName
-
9
,
L".vlnk.iso"
)
==
0
||
lstrcmp
(
FileName
-
9
,
L".vlnk.img"
)
==
0
||
lstrcmp
(
FileName
-
9
,
L".vlnk.wim"
)
==
0
||
lstrcmp
(
FileName
-
9
,
L".vlnk.vhd"
)
==
0
||
lstrcmp
(
FileName
-
9
,
L".vlnk.efi"
)
==
0
||
lstrcmp
(
FileName
-
9
,
L".vlnk.dat"
)
==
0
)
if
(
lstrcmp
(
FileName
+
len
-
9
,
L".vlnk.iso"
)
==
0
||
lstrcmp
(
FileName
+
len
-
9
,
L".vlnk.img"
)
==
0
||
lstrcmp
(
FileName
+
len
-
9
,
L".vlnk.wim"
)
==
0
||
lstrcmp
(
FileName
+
len
-
9
,
L".vlnk.vhd"
)
==
0
||
lstrcmp
(
FileName
+
len
-
9
,
L".vlnk.efi"
)
==
0
||
lstrcmp
(
FileName
+
len
-
9
,
L".vlnk.dat"
)
==
0
)
{
return
TRUE
;
}
...
...
@@ -407,8 +407,8 @@ static BOOL IsSupportedVlnkSuffix(WCHAR *FileName)
if
(
len
>
10
)
{
if
(
lstrcmp
(
FileName
-
10
,
L".vlnk.vhdx"
)
==
0
||
lstrcmp
(
FileName
-
9
,
L".vlnk.vtoy"
)
==
0
)
if
(
lstrcmp
(
FileName
+
len
-
10
,
L".vlnk.vhdx"
)
==
0
||
lstrcmp
(
FileName
+
len
-
10
,
L".vlnk.vtoy"
)
==
0
)
{
return
TRUE
;
}
...
...
@@ -879,6 +879,13 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
return
1
;
}
if
(
!
IsSupportedVlnkSuffix
(
g_CmdOutFile
))
{
LogW
(
L"File <<%ls>> contains invalid vlnk suffix!
\n
"
,
g_CmdOutFile
);
VtoyMessageBox
(
NULL
,
g_msg_lang
[
MSGID_INVALID_SUFFIX
],
g_msg_lang
[
MSGID_ERROR
],
MB_OK
|
MB_ICONERROR
);
return
1
;
}
return
CreateVlnk
(
NULL
,
g_CurDirW
,
g_CmdInFile
,
g_CmdOutFile
);
}
else
...
...
Vlnk/vs/VentoyVlnk/Release/VentoyVlnk.exe
View file @
e3506c0f
No preview for this file type
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