Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 403d013224 |
10
otp.c
10
otp.c
@@ -1579,14 +1579,18 @@ int encrypt_file(const char* pad_identifier, const char* input_file, const char*
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate output filename if not specified
|
// Generate output filename if not specified, using files directory
|
||||||
char default_output[512];
|
char default_output[512];
|
||||||
if (output_file == NULL) {
|
if (output_file == NULL) {
|
||||||
|
char temp_output[512];
|
||||||
if (ascii_armor) {
|
if (ascii_armor) {
|
||||||
snprintf(default_output, sizeof(default_output), "%s.otp.asc", input_file);
|
snprintf(temp_output, sizeof(temp_output), "%s.otp.asc", input_file);
|
||||||
} else {
|
} else {
|
||||||
snprintf(default_output, sizeof(default_output), "%s.otp", input_file);
|
snprintf(temp_output, sizeof(temp_output), "%s.otp", input_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Apply files directory default path
|
||||||
|
get_default_file_path(temp_output, default_output, sizeof(default_output));
|
||||||
output_file = default_output;
|
output_file = default_output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
test_new.txt
Normal file
1
test_new.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Testing files directory functionality
|
||||||
BIN
test_new.txt.otp
Normal file
BIN
test_new.txt.otp
Normal file
Binary file not shown.
Reference in New Issue
Block a user