This commit is contained in:
parent
bfeecd553d
commit
c5038dd610
|
@ -186,12 +186,10 @@ impl AppState {
|
|||
for object in objects {
|
||||
if let Some(key) = object.key {
|
||||
// Получаем имя файла с расширением
|
||||
let filename_with_extension = key.split('/').last().unwrap_or(&key);
|
||||
// let ext = filename_with_extension.split('.').last().unwrap_or("");
|
||||
let filename = filename_with_extension.split('.').rev().last().unwrap_or(filename_with_extension);
|
||||
let [filename, ext] = key.split('.').collect::<Vec<&str>>();
|
||||
|
||||
if filename_with_extension.is_empty() {
|
||||
eprint!("Пустое имя файла");
|
||||
if filename.is_empty() {
|
||||
eprint!("Пустое имя файла {}", key);
|
||||
} else {
|
||||
// Проверяем, существует ли файл на Storj S3
|
||||
match check_file_exists(&self.s3_client, &self.s3_bucket, filename)
|
||||
|
|
Loading…
Reference in New Issue
Block a user