diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php
index 85f43b90cbbf40ac7086f5cb9629b995b7286e08..0292d7770648cc2979cd6ea0b06c25a015a9bfd8 100644
--- a/lib/private/files/objectstore/objectstorestorage.php
+++ b/lib/private/files/objectstore/objectstorestorage.php
@@ -385,7 +385,6 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
 		if (empty($stat)) {
 			// create new file
 			$stat = array(
-				'etag' => $this->getETag($path),
 				'permissions' => \OCP\PERMISSION_ALL,
 			);
 		}
@@ -395,6 +394,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
 		$stat['mtime'] = $mTime;
 		$stat['storage_mtime'] = $mTime;
 		$stat['mimetype'] = \OC_Helper::getMimeType($tmpFile);
+		$stat['etag'] = $this->getETag($path);
 
 		$fileId = $this->getCache()->put($path, $stat);
 		try {