public function rotateInstalledFiles($installPath)
    {
        $fsm = new Filesystem;
        $tempDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('oci-');
        DebugPrinter::log('Rotating files using `%s` dir', $tempDir);
        // unzipped contents may or may not contain `upload.*` directory,
        // which holds actual opencart contents.
        $dirs = glob($installPath . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);
        foreach ($dirs as $key => $dir) {
            if ($dir[0] === '.') {
                unset($dirs[$key]);
            }
        }
        if (sizeof($dirs) === 1) {
            $subDirectory = $tempDir . DIRECTORY_SEPARATOR .
                dirname(reset($dirs));
            $fsm->rename($installPath, $tempDir);
            $fsm->rename($subDirectory, $installPath);
            $fsm->remove($tempDir);
        }
    }