Overview
Comment:Supprimer seulement quand le fichier existe (erreur rare d'accès concurrents)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0de2c604e16afaf0579f22b611ffe8ee03d811d7
User & Date: bohwaz on 2018-05-10 10:53:08
Other Links: manifest | tags
References
2020-12-08
23:25 Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz
Context
2018-05-10
10:55
Eviter erreur si le compte n'est pas dans la liste check-in: 7d5024ed30 user: bohwaz tags: trunk
10:53
Supprimer seulement quand le fichier existe (erreur rare d'accès concurrents) check-in: 0de2c604e1 user: bohwaz tags: trunk
2018-05-02
17:59
DB::get renvoie un objet, non un tableau check-in: 7d0a603b6f user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Utils.php from [7fbdced7dc] to [eb83eb79bd].

461
462
463
464
465
466
467


468

469
470
471
472
473
474
475
        $path = CACHE_ROOT . '/' . $path;
        $dir = dir($path);

        while ($file = $dir->read())
        {
            if ($file[0] != '.')
            {


                unlink($path . '/' . $file);

            }
        }

        $dir->close();
        return true;
    }








>
>
|
>







461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
        $path = CACHE_ROOT . '/' . $path;
        $dir = dir($path);

        while ($file = $dir->read())
        {
            if ($file[0] != '.')
            {
            	if (file_exists($path . DIRECTORY_SEPARATOR . $file))
            	{
                	unlink($path . DIRECTORY_SEPARATOR . $file);
                }
            }
        }

        $dir->close();
        return true;
    }