diff --git a/scripts/run_docker_shell.sh b/scripts/run_docker_shell.sh index 5949ba92..efdd83da 100755 --- a/scripts/run_docker_shell.sh +++ b/scripts/run_docker_shell.sh @@ -13,13 +13,16 @@ else TYPE=64_bit fi - docker stop repertory_${NAME} - docker rm repertory_${NAME} - docker build -t repertory:${NAME} - < docker/${TYPE}/${NAME} && - docker run -itd --device /dev/fuse --cap-add SYS_ADMIN --name repertory_${NAME} -v $(pwd):/mnt repertory:${NAME} && - docker exec -it repertory_${NAME} /bin/bash - docker stop repertory_${NAME} - docker rm repertory_${NAME} + TAG=repertory_shell + CONTAINER=${TAG}_shell_${NAME} + + docker stop ${CONTAINER} + docker rm ${CONTAINER} + docker build -t ${TAG}:${NAME} - < docker/${TYPE}/${NAME} && + docker run -itd --device /dev/fuse --cap-add SYS_ADMIN --name ${CONTAINER} -v $(pwd):/mnt ${TAG}:${NAME} && + docker exec -it ${CONTAINER} /bin/bash + docker stop ${CONTAINER} + docker rm ${CONTAINER} fi popd popd diff --git a/src/drives/fuse/fuse_drive_base.cpp b/src/drives/fuse/fuse_drive_base.cpp index 5ea740b8..d72c4bdb 100644 --- a/src/drives/fuse/fuse_drive_base.cpp +++ b/src/drives/fuse/fuse_drive_base.cpp @@ -304,11 +304,11 @@ void fuse_drive_base::populate_stat(const std::string &api_path, const api_meta_map &meta, bool directory, i_provider &provider, struct stat *st) { memset(st, 0, sizeof(struct stat)); - st->st_nlink = - (directory ? 2 + (size_or_count == 0U - ? provider.get_directory_item_count(api_path) - : size_or_count) - : 1); + st->st_nlink = static_cast( + directory ? 2 + (size_or_count == 0U + ? provider.get_directory_item_count(api_path) + : size_or_count) + : 1); if (directory) { st->st_blocks = 0; } else {