diff --git a/lib/ProfileServer.php b/lib/ProfileServer.php index cc72345..62776cd 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($profileId, 4)); + } // The internal adapter $adapter = new \League\Flysystem\Adapter\Local( // Determine root directory - PROFILEBASE . "$profileId/" + PROFILEBASE . $profilePath ); $graph = new \EasyRdf\Graph(); 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 new file mode 100644 index 0000000..3cdec93 --- /dev/null +++ b/upgrade/0.4.2/upgrade.php @@ -0,0 +1,48 @@ + $destination\n\n"; + } else { + echo "Failed: $dir\n"; + } + } +}