From 5a1070af26a4b567c9fbadb2dbc2992195f880f6 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 10 Jun 2024 14:45:33 +0300 Subject: [PATCH] update filename length correction --- src/put.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/put.php b/src/put.php index b6dc646..dd8f054 100644 --- a/src/put.php +++ b/src/put.php @@ -73,18 +73,14 @@ $basename = basename( $argv[2] ); -// Check filename not longer of protocol +// Check filename length match protocol if (mb_strlen($basename) > 255) { - // Get file hash sum - $basename = md5_file( - $argv[2] - ); - - // Dump event print( - 'Filename to long, used md5_file as key...' . PHP_EOL + 'filename too long' . PHP_EOL ); + + exit; } // Split content to smaller parts (according to the protocol limits)