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
5eec5353
Commit
5eec5353
authored
Apr 24, 2022
by
longpanda
Browse files
--xdg improvement
parent
33a562c2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
0 deletions
+20
-0
INSTALL/VentoyGUI.aarch64
INSTALL/VentoyGUI.aarch64
+0
-0
INSTALL/VentoyGUI.i386
INSTALL/VentoyGUI.i386
+0
-0
INSTALL/VentoyGUI.mips64el
INSTALL/VentoyGUI.mips64el
+0
-0
INSTALL/VentoyGUI.x86_64
INSTALL/VentoyGUI.x86_64
+0
-0
LinuxGUI/Ventoy2Disk/ventoy_gui.c
LinuxGUI/Ventoy2Disk/ventoy_gui.c
+20
-0
No files found.
INSTALL/VentoyGUI.aarch64
View file @
5eec5353
No preview for this file type
INSTALL/VentoyGUI.i386
View file @
5eec5353
No preview for this file type
INSTALL/VentoyGUI.mips64el
View file @
5eec5353
No preview for this file type
INSTALL/VentoyGUI.x86_64
View file @
5eec5353
No preview for this file type
LinuxGUI/Ventoy2Disk/ventoy_gui.c
View file @
5eec5353
...
@@ -1318,6 +1318,16 @@ int main(int argc, char **argv)
...
@@ -1318,6 +1318,16 @@ int main(int argc, char **argv)
snprintf
(
g_log_file
,
sizeof
(
g_log_file
),
"%s/ventoy.log"
,
env
);
snprintf
(
g_log_file
,
sizeof
(
g_log_file
),
"%s/ventoy.log"
,
env
);
touch_new_file
(
g_log_file
);
touch_new_file
(
g_log_file
);
}
}
else
{
env
=
getenv
(
"HOME"
);
if
(
env
&&
is_dir_exist
(
"%s/.cache"
,
env
))
{
g_xdg_log
=
1
;
snprintf
(
g_log_file
,
sizeof
(
g_log_file
),
"%s/.cache/ventoy.log"
,
env
);
touch_new_file
(
g_log_file
);
}
}
env
=
getenv
(
"XDG_CONFIG_HOME"
);
env
=
getenv
(
"XDG_CONFIG_HOME"
);
if
(
env
)
if
(
env
)
...
@@ -1326,6 +1336,16 @@ int main(int argc, char **argv)
...
@@ -1326,6 +1336,16 @@ int main(int argc, char **argv)
snprintf
(
g_ini_file
,
sizeof
(
g_ini_file
),
"%s/Ventoy2Disk.ini"
,
env
);
snprintf
(
g_ini_file
,
sizeof
(
g_ini_file
),
"%s/Ventoy2Disk.ini"
,
env
);
touch_new_file
(
g_ini_file
);
touch_new_file
(
g_ini_file
);
}
}
else
{
env
=
getenv
(
"HOME"
);
if
(
env
&&
is_dir_exist
(
"%s/.config"
,
env
))
{
g_xdg_ini
=
1
;
snprintf
(
g_ini_file
,
sizeof
(
g_ini_file
),
"%s/.config/Ventoy2Disk.ini"
,
env
);
touch_new_file
(
g_ini_file
);
}
}
}
}
}
}
...
...
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