From e6ff9405aa7d33139c97f0d73df09dfafac588ef Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 10 Jul 2026 14:48:19 +0200 Subject: [PATCH 1/4] shard profile directories the same way storage pods are --- lib/ProfileServer.php | 7 +++++- upgrade/0.4.2/upgrade.php | 48 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 upgrade/0.4.2/upgrade.php diff --git a/lib/ProfileServer.php b/lib/ProfileServer.php index cc72345..1962551 100644 --- a/lib/ProfileServer.php +++ b/lib/ProfileServer.php @@ -12,10 +12,15 @@ public static function getFileSystem() { $profileId = self::getProfileId(); + if (is_dir(PROFILEBASE . "$profileId/")) { // backwards compatiblity check + $profilePath = $profileId; + } else { + $profilePath = implode("/", str_split($storageId, 4)); + } // The internal adapter $adapter = new \League\Flysystem\Adapter\Local( // Determine root directory - PROFILEBASE . "$profileId/" + $profilePath ); $graph = new \EasyRdf\Graph(); diff --git a/upgrade/0.4.2/upgrade.php b/upgrade/0.4.2/upgrade.php new file mode 100644 index 0000000..55f3c7f --- /dev/null +++ b/upgrade/0.4.2/upgrade.php @@ -0,0 +1,48 @@ + $destination\n\n"; + } else { + echo "Failed: $dir\n"; + } + } +} \ No newline at end of file From f91f296e3f80b80c7931b2e9cfaac4b8969816ba Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Thu, 3 Sep 2026 10:06:20 +0200 Subject: [PATCH 2/4] whitespace fixes, add README for the upgrade --- lib/ProfileServer.php | 10 +++++----- upgrade/0.4.2/README | 3 +++ upgrade/0.4.2/upgrade.php | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 upgrade/0.4.2/README diff --git a/lib/ProfileServer.php b/lib/ProfileServer.php index 1962551..d26908d 100644 --- a/lib/ProfileServer.php +++ b/lib/ProfileServer.php @@ -12,11 +12,11 @@ public static function getFileSystem() { $profileId = self::getProfileId(); - if (is_dir(PROFILEBASE . "$profileId/")) { // backwards compatiblity check - $profilePath = $profileId; - } else { - $profilePath = implode("/", str_split($storageId, 4)); - } + if (is_dir(PROFILEBASE . "$profileId/")) { // backwards compatiblity check + $profilePath = $profileId; + } else { + $profilePath = implode("/", str_split($storageId, 4)); + } // The internal adapter $adapter = new \League\Flysystem\Adapter\Local( // Determine root directory diff --git a/upgrade/0.4.2/README b/upgrade/0.4.2/README new file mode 100644 index 0000000..a7a172d --- /dev/null +++ b/upgrade/0.4.2/README @@ -0,0 +1,3 @@ +This version has a change to store profile directories split out over subdirectories, to make sure we stay navigatable when the number of pod grows. + +The upgrade script moves the existing directories from the 32 character directories in 1 directory, to multiple subdirectories. diff --git a/upgrade/0.4.2/upgrade.php b/upgrade/0.4.2/upgrade.php index 55f3c7f..3cdec93 100644 --- a/upgrade/0.4.2/upgrade.php +++ b/upgrade/0.4.2/upgrade.php @@ -45,4 +45,4 @@ echo "Failed: $dir\n"; } } -} \ No newline at end of file +} From b3bc5aa09cf96a20d614748aa9601f4d3ebf3312 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Thu, 3 Sep 2026 10:16:35 +0200 Subject: [PATCH 3/4] add missing profileBase --- lib/ProfileServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ProfileServer.php b/lib/ProfileServer.php index d26908d..2ccf76c 100644 --- a/lib/ProfileServer.php +++ b/lib/ProfileServer.php @@ -20,7 +20,7 @@ public static function getFileSystem() // The internal adapter $adapter = new \League\Flysystem\Adapter\Local( // Determine root directory - $profilePath + PROFILEBASE . $profilePath ); $graph = new \EasyRdf\Graph(); From 3290859253075abcd96ee60a5f721cb693facd45 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Thu, 3 Sep 2026 10:33:50 +0200 Subject: [PATCH 4/4] storageId -> profileId --- lib/ProfileServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ProfileServer.php b/lib/ProfileServer.php index 2ccf76c..62776cd 100644 --- a/lib/ProfileServer.php +++ b/lib/ProfileServer.php @@ -15,7 +15,7 @@ public static function getFileSystem() if (is_dir(PROFILEBASE . "$profileId/")) { // backwards compatiblity check $profilePath = $profileId; } else { - $profilePath = implode("/", str_split($storageId, 4)); + $profilePath = implode("/", str_split($profileId, 4)); } // The internal adapter $adapter = new \League\Flysystem\Adapter\Local(