diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index 8993ecab4..b973716a8 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -61,7 +61,8 @@ class RansomwarePayload: file_list = self._find_files() self._encrypt_files(file_list) - self._leave_readme() + if self._target_dir: + self._leave_readme() def _find_files(self) -> List[Path]: LOG.info(f"Collecting files in {self._target_dir}")