Skip to content
Snippets Groups Projects
Commit 83beea60 authored by Laurent's avatar Laurent
Browse files

dev #13442 fix thumbnail write on command line

parent 19d1a121
Branches
Tags
3 merge requests!1797Master,!1740Dev#13442 oai cite de la musique,!1731Dev#13442 oai cite de la musique
......@@ -30,7 +30,8 @@ class CosmoPaths {
public function getBasePath() {
$parts = explode('/', $this->getFilePath());
$parts = array_filter(explode('/', $this->getFilePath()),
function($part) { return $part !== '';});
while ((count($parts)>0) && (end($parts) !== static::$_dir_name))
array_pop($parts);
array_pop($parts);
......
......@@ -214,6 +214,11 @@ class CosmoPathsFromCommandLineTest extends CosmoPathsTestCase {
->whenCalled('getcwd')
->answers('/srv/http/bokeh.fr/cosmogramme'));
}
/** @test */
public function getBasePathShouldNotStartWithADoubleSlash() {
$this->assertEquals('/srv/http/', substr($this->_cosmo_paths->getBasePath(), 0, 10));
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment