bug #18271 [FileSystem] Google app engine filesystem (swordbeta)

This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #18271).

Discussion
----------

[FileSystem] Google app engine filesystem

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/17922
| License       | MIT
| Doc PR        | -

Commits
-------

06d8697 [FileSystem] Add support for Google App Engine.
This commit is contained in:
Fabien Potencier 2016-03-27 12:19:31 +02:00
commit 7dafdda580
1 changed files with 3 additions and 3 deletions

View File

@ -486,13 +486,13 @@ class Filesystem
{
list($scheme, $hierarchy) = $this->getSchemeAndHierarchy($dir);
// If no scheme or scheme is "file" create temp file in local filesystem
if (null === $scheme || 'file' === $scheme) {
// If no scheme or scheme is "file" or "gs" create temp file in local filesystem
if (null === $scheme || 'file' === $scheme || 'gs' === $scheme) {
$tmpFile = tempnam($hierarchy, $prefix);
// If tempnam failed or no scheme return the filename otherwise prepend the scheme
if (false !== $tmpFile) {
if (null !== $scheme) {
if (null !== $scheme && 'gs' !== $scheme) {
return $scheme.'://'.$tmpFile;
}