<commit_before>#include <errno.h>
#include <stdio.h>

#include "runtime/general/select.h"
#include "state/state.h"
#include "util/util.h"

int 
runtime_command_select(struct command_args* cmd_args)
{
	char* full_path;
	
	errno = 0;
	full_path = realpath(cmd_args->text_args[1], NULL);

	if (errno != 0) {
		perror("select: realpath");
		return 0;
	}

	if (file_exists(full_path) == 0) {
		if (is_elf(full_path) == 0) {
			*(cmd_args->state) = PREPARING;
			*(cmd_args->exec_path) = full_path;
		} else {
			fprintf(stderr, "Selected file is not an ELF binary.\n");
		}
	} else {
		fprintf(stderr, "No such file.\n");
	}

	return 0;
}
<commit_msg>Improved no such file message<commit_after>#include <errno.h>
#include <stdio.h>

#include "runtime/general/select.h"
#include "state/state.h"
#include "util/util.h"

int 
runtime_command_select(struct command_args* cmd_args)
{
	char* full_path;
	
	errno = 0;
	full_path = realpath(cmd_args->text_args[1], NULL);

	if (errno != 0) {
		perror("select: realpath");
		return 0;
	}

	if (file_exists(full_path) == 0) {
		if (is_elf(full_path) == 0) {
			*(cmd_args->state) = PREPARING;
			*(cmd_args->exec_path) = full_path;
		} else {
			fprintf(stderr, "Selected file is not an ELF binary.\n");
		}
	} else {
		fprintf(stderr, "No such file: '%s'.\n", full_path);
	}

	return 0;
}

{'fraction_non_alphanumeric': 0.16830188679245284, 'fraction_numerical': 0.010566037735849057, 'mean_word_length': 4.080459770114943, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7364120', 'n_tokens_mistral': 579, 'n_tokens_neox': 531, 'n_words': 114}