+ /* write the metadata file */
+ struct workshop_file_info meta;
+ meta.author = args->steamid;
+ vg_strncpy( args->username, meta.author_name, vg_list_size(meta.author_name),
+ k_strncpy_always_add_null );
+ vg_strncpy( workshop_form.submission.title, meta.title,
+ vg_list_size(meta.title), k_strncpy_always_add_null );
+
+ char _path[1024];
+ vg_str path;
+ vg_strnull( &path, _path, vg_list_size( _path ) );
+ vg_strcat( &path, info->abs_content_file );
+ vg_strcat( &path, ".inf" );
+
+ if( vg_strgood( &path ) ){
+ FILE *fp = fopen( _path, "wb" );
+
+ if( fp ){
+ fwrite( &meta, sizeof(struct workshop_file_info), 1, fp );
+ fclose( fp );
+ }
+ else{
+ info->success = 0;
+ info->failure_reason = "Cant write .inf file";
+ vg_async_dispatch( call, workshop_form_async_package_complete );
+ }
+ }
+ else{
+ info->success = 0;
+ info->failure_reason = "Path too long";
+ vg_async_dispatch( call, workshop_form_async_package_complete );
+ return;
+ }
+