From f520fda6fb0a05ade17ffbb72030a6b251baa108 Mon Sep 17 00:00:00 2001 From: weisd Date: Tue, 15 Oct 2024 14:45:50 +0000 Subject: [PATCH] fix list_volumes name --- .devcontainer/devcontainer.json | 17 +++++++++++++++++ ecstore/src/disk/local.rs | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..ea5c621e5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,17 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "rustfs-dev", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "rustfs-dev" + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "pip3 install --user -r requirements.txt", + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} \ No newline at end of file diff --git a/ecstore/src/disk/local.rs b/ecstore/src/disk/local.rs index 0e4e9560c..6a28a8951 100644 --- a/ecstore/src/disk/local.rs +++ b/ecstore/src/disk/local.rs @@ -12,7 +12,7 @@ use crate::disk::os::check_path_length; use crate::disk::{LocalFileReader, LocalFileWriter, STORAGE_FORMAT_FILE}; use crate::error::{Error, Result}; use crate::utils::fs::{lstat, O_APPEND, O_CREATE, O_RDONLY, O_WRONLY}; -use crate::utils::path::{has_suffix, SLASH_SEPARATOR}; +use crate::utils::path::{clean, has_suffix, SLASH_SEPARATOR}; use crate::{ file_meta::FileMeta, store_api::{FileInfo, RawFileInfo}, @@ -1338,7 +1338,7 @@ impl DiskAPI for LocalDisk { } volumes.push(VolumeInfo { - name: entry, + name: clean(&entry), created: None, }); }