Skip to content

Add -s/--static flag for fixed crash extraction directory#9

Merged
yldrefruz merged 3 commits intomainfrom
copilot/add-static-directory-export-flag
Apr 16, 2026
Merged

Add -s/--static flag for fixed crash extraction directory#9
yldrefruz merged 3 commits intomainfrom
copilot/add-static-directory-export-flag

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

  • Add g_static_mode global to duef_args.h / duef_args.c
  • Handle -s / --static short and long options in duef_args.c
  • Update print_usage to document the new flag
  • In duef_file_ops.c process_crash_files, use a fixed "static" directory name when g_static_mode is set
  • Define STATIC_DIR_NAME constant; pass directory override directly through output_results / build_file_output_string
  • Fix resolve_app_file_path to use file->file_name->length instead of directory->length for the file name width specifier
  • Update README.md to document the new flag
  • Build, test, and validate

Copilot AI and others added 2 commits April 16, 2026 11:25
@yldrefruz
Copy link
Copy Markdown
Owner

@copilot File names inside the directories are fixed to length 6 (which is the same length as the name "static"). This casues the file names to be lost and incorrect. This should be fixed.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

@copilot File names inside the directories are fixed to length 6 (which is the same length as the name "static"). This casues the file names to be lost and incorrect. This should be fixed.

Fixed in 8b0de80. resolve_app_file_path was passing directory->length as the %.*s precision for the file name, so file names were being truncated to however many characters the directory name happened to be (6 in static mode). Changed it to use file->file_name->length instead.

Copilot AI requested a review from yldrefruz April 16, 2026 11:41
@yldrefruz yldrefruz marked this pull request as ready for review April 16, 2026 11:55
@yldrefruz yldrefruz merged commit 88b1957 into main Apr 16, 2026
4 checks passed
@yldrefruz yldrefruz deleted the copilot/add-static-directory-export-flag branch April 16, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants