Skip to content

FILENAME_MAX, runtime unlink(), add progress output - #1

Open
CH-DanReif wants to merge 2 commits into
nh2:masterfrom
CH-DanReif:patch-1
Open

FILENAME_MAX, runtime unlink(), add progress output#1
CH-DanReif wants to merge 2 commits into
nh2:masterfrom
CH-DanReif:patch-1

Conversation

@CH-DanReif

Copy link
Copy Markdown

No description provided.

Comment thread dentls.c
unsigned short show_progress = 0; // By default, don't show progress
unsigned short print_only = 1; // By default, print entries, don't unlink
unsigned long progress_interval_minor = 1000; // Print a ".".
unsigned long progress_interval_major = 50; // Print the number done so far.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually, these should be configurable via the value of DENTLS_PROGRESS.

Comment thread dentls.c
exit(1);
}

if (argv[1][0] == '-' || argv[1][0] != '/') {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is duplicative. It's here to emphasize that, even if we add proper option handling, we should still require absolute paths.

Comment thread dentls.c
printf("%s\n", *(char **)node);
// rc = unlink(*(char **)node);
if (print_only) {
printf("%s\n", *(char **)node);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As modified, this is the only thing that ever appears on stdout.

@CH-DanReif CH-DanReif changed the title Use FILENAME_MAX instead of hardcoded max Use FILENAME_MAX, enable deletes at runtime, add progress output Nov 30, 2018
@CH-DanReif CH-DanReif changed the title Use FILENAME_MAX, enable deletes at runtime, add progress output FILENAME_MAX, enable deletes at runtime, add progress output Nov 30, 2018
@CH-DanReif CH-DanReif changed the title FILENAME_MAX, enable deletes at runtime, add progress output FILENAME_MAX, runtime unlink(), add progress output Nov 30, 2018
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.

1 participant