diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6bfeae8..045f434 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,10 @@
# Changelog
All notable changes to this project will be documented in this file.
+## 1.20.1 – 2024-09-12
+### Fixed
+- fix(versions): Fix compatibility with files_versions and PHP strict types
+
## 1.20.0 – 2024-07-30
### Changed
- Require Nextcloud 30
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 8ec578f..de45bf2 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -17,7 +17,7 @@ An example would be to deny access to MS Excel/XLSX files owned by the "Human Re
Learn more about File Access Control on [https://nextcloud.com/workflow](https://nextcloud.com/workflow)
- 1.20.0
+ 1.20.1
agpl
Arthur Schiwon
Joas Schilling
diff --git a/lib/Operation.php b/lib/Operation.php
index afb6d0d..b8ab90a 100644
--- a/lib/Operation.php
+++ b/lib/Operation.php
@@ -134,7 +134,10 @@ protected function translatePath(IStorage $storage, string $path): string {
[$folder, $innerPath] = explode('/', $path, 2);
if ($folder === 'files_versions') {
- $innerPath = substr($innerPath, 0, strrpos($innerPath, '.v'));
+ if (preg_match('/.+\.v\d{10}$/', basename($innerPath))) {
+ // Remove trailing ".v{timestamp}"
+ $innerPath = substr($innerPath, 0, -12);
+ }
return 'files/' . $innerPath;
} elseif ($folder === 'thumbnails') {
[$fileId,] = explode('/', $innerPath, 2);
diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml
index b6b2f69..b17e249 100644
--- a/tests/psalm-baseline.xml
+++ b/tests/psalm-baseline.xml
@@ -18,9 +18,6 @@
-
-
-