fix for "when the path is directory" in deploy_spec