projects
/
pharext
/
pharext
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
download progress, cleanups
[pharext/pharext]
/
src
/
pharext
/
Tempfile.php
diff --git
a/src/pharext/Tempfile.php
b/src/pharext/Tempfile.php
index d31f45772d75f90057898edfc314e94c8524e53c..c890cd92262b1ec163bb6d9dc19d5959343afa1e 100644
(file)
--- a/
src/pharext/Tempfile.php
+++ b/
src/pharext/Tempfile.php
@@
-8,11
+8,12
@@
class Tempfile extends \SplFileInfo
function __construct($prefix) {
$tries = 0;
function __construct($prefix) {
$tries = 0;
- $template = sys_get_temp_dir()."/$prefix.";
+ /* PharData needs a dot in the filename, sure */
+ $temp = sys_get_temp_dir() . "/";
$omask = umask(077);
do {
$omask = umask(077);
do {
- $path = $temp
late.uniqid()
;
+ $path = $temp
.uniqid($prefix).".tmp"
;
$this->handle = fopen($path, "x");
} while (!is_resource($this->handle) && $tries++ < 10);
umask($omask);
$this->handle = fopen($path, "x");
} while (!is_resource($this->handle) && $tries++ < 10);
umask($omask);