Command failed: unzip -oq -d

Command failed: unzip -oq -d

问题描述

nodejs使用child_process执行解压操作,Linux生产环境下,一直报错。
Command failed: unzip -oq -d /root/5ea01d2383e6f8057b829349/materials /root/5ea01d2383e6f8057b829349/materials/material.zip/ unzip: cannot find or open /root/5ea01d2383e6f8057b829349/materials/material.zip/, /root/5ea01d2383e6f8057b829349/materials/material.zip/.zip or /root/5ea01d2383e6f8057b829349/materials/material.zip/.ZIP.

查找本地文件,确实存在/root/5ea01d2383e6f8057b829349/materials/material.zip

问题原因

是因为目的路径多加了一个/
细品:
/root/5ea01d2383e6f8057b829349/materials/material.zip
/root/5ea01d2383e6f8057b829349/materials/material.zip/

很sb的一个问题,调试了好久才发现

你可能感兴趣的:(错误集锦)