diff --git a/src/OcflStorageService.php b/src/OcflStorageService.php index 7835d0b..e493ca8 100644 --- a/src/OcflStorageService.php +++ b/src/OcflStorageService.php @@ -175,7 +175,9 @@ class OcflStorageService { // Create the OCFL root indicator file if it doesn't exist. $ocfl_root_indicator_path = $this->ocflRoot . '/.ocfl_layout'; - $this->fileSystem->saveData('ocfl_layout_1.0', $ocfl_root_indicator_path,FileExists::Error); + if(!file_exists($ocfl_root_indicator_path)) { + $this->fileSystem->saveData('ocfl_layout_1.0', $ocfl_root_indicator_path, FileExists::Error); + } }