@@ -212,7 +212,7 @@ mkdir_p(const char* const path)
212
212
}
213
213
214
214
void
215
- print_help (const char * appimage_fullpath )
215
+ print_help (const char * appimage_full_path )
216
216
{
217
217
// TODO: "--appimage-list List content from embedded filesystem image\n"
218
218
fprintf (stderr ,
@@ -244,19 +244,19 @@ print_help(const char *appimage_fullpath)
244
244
" and is neither moved nor renamed, the application contained inside this\n"
245
245
" AppImage to store its data in this directory rather than in your home\n"
246
246
" directory\n"
247
- , appimage_fullpath );
247
+ , appimage_full_path );
248
248
}
249
249
250
250
void
251
- portable_option (const char * arg , const char * appimage_fullpath , const char * name )
251
+ portable_option (const char * arg , const char * appimage_full_path , const char * name )
252
252
{
253
253
char option [32 ];
254
254
sprintf (option , "appimage-portable-%s" , name );
255
255
256
256
if (arg && strcmp (arg , option )== 0 ) {
257
257
char portable_dir [PATH_MAX ];
258
258
259
- sprintf (portable_dir , "%s.%s" , appimage_fullpath , name );
259
+ sprintf (portable_dir , "%s.%s" , appimage_full_path , name );
260
260
if (!mkdir (portable_dir , S_IRWXU ))
261
261
fprintf (stderr , "Portable %s directory created at %s\n" , name , portable_dir );
262
262
else
@@ -578,20 +578,20 @@ int main(int argc, char *argv[]) {
578
578
}
579
579
580
580
// calculate full path of AppImage
581
- char appimage_fullpath [PATH_MAX ];
581
+ char appimage_full_path [PATH_MAX ];
582
582
583
583
if (getenv ("TARGET_APPIMAGE" ) == NULL ) {
584
584
// If we are operating on this file itself, then we've already
585
585
// expanded the symlink at `/proc/self/exe` in order to work
586
586
// around the issue with gcompat described above
587
- strcpy (appimage_fullpath , appimage_path );
587
+ strcpy (appimage_full_path , appimage_path );
588
588
} else {
589
589
char * abspath = realpath (appimage_path , NULL );
590
590
if (abspath == NULL ) {
591
591
perror ("Failed to obtain realpath for $TARGET_APPIMAGE" );
592
592
exit (EXIT_EXECERROR );
593
593
}
594
- strcpy (appimage_fullpath , abspath );
594
+ strcpy (appimage_full_path , abspath );
595
595
free (abspath );
596
596
}
597
597
@@ -617,7 +617,7 @@ int main(int argc, char *argv[]) {
617
617
618
618
/* Print the help and then exit */
619
619
if (arg && strcmp (arg ,"appimage-help" )== 0 ) {
620
- print_help (appimage_fullpath );
620
+ print_help (appimage_full_path );
621
621
exit (0 );
622
622
}
623
623
@@ -714,7 +714,7 @@ int main(int argc, char *argv[]) {
714
714
new_argv [new_argc ] = NULL ;
715
715
716
716
/* Setting some environment variables that the app "inside" might use */
717
- setenv ("APPIMAGE" , appimage_fullpath , 1 );
717
+ setenv ("APPIMAGE" , appimage_full_path , 1 );
718
718
setenv ("ARGV0" , argv0_path , 1 );
719
719
setenv ("APPDIR" , prefix , 1 );
720
720
@@ -772,8 +772,8 @@ int main(int argc, char *argv[]) {
772
772
exit (0 );
773
773
}
774
774
775
- portable_option (arg , appimage_fullpath , "home" );
776
- portable_option (arg , appimage_fullpath , "config" );
775
+ portable_option (arg , appimage_full_path , "home" );
776
+ portable_option (arg , appimage_full_path , "config" );
777
777
778
778
// If there is an argument starting with appimage- (but not appimage-mount which is handled further down)
779
779
// then stop here and print an error message
@@ -895,23 +895,23 @@ int main(int argc, char *argv[]) {
895
895
}
896
896
897
897
/* Setting some environment variables that the app "inside" might use */
898
- setenv ( "APPIMAGE" , appimage_fullpath , 1 );
898
+ setenv ( "APPIMAGE" , appimage_full_path , 1 );
899
899
setenv ( "ARGV0" , argv0_path , 1 );
900
900
setenv ( "APPDIR" , mount_dir , 1 );
901
901
902
902
char portable_home_dir [PATH_MAX ];
903
903
char portable_config_dir [PATH_MAX ];
904
904
905
905
/* If there is a directory with the same name as the AppImage plus ".home", then export $HOME */
906
- strcpy (portable_home_dir , appimage_fullpath );
906
+ strcpy (portable_home_dir , appimage_full_path );
907
907
strcat (portable_home_dir , ".home" );
908
908
if (is_writable_directory (portable_home_dir )){
909
909
fprintf (stderr , "Setting $HOME to %s\n" , portable_home_dir );
910
910
setenv ("HOME" ,portable_home_dir ,1 );
911
911
}
912
912
913
913
/* If there is a directory with the same name as the AppImage plus ".config", then export $XDG_CONFIG_HOME */
914
- strcpy (portable_config_dir , appimage_fullpath );
914
+ strcpy (portable_config_dir , appimage_full_path );
915
915
strcat (portable_config_dir , ".config" );
916
916
if (is_writable_directory (portable_config_dir )){
917
917
fprintf (stderr , "Setting $XDG_CONFIG_HOME to %s\n" , portable_config_dir );
0 commit comments