diff --git a/lib/GPGCryptography.class.php b/lib/GPGCryptography.class.php index 7be0c3a..fa31a0f 100644 --- a/lib/GPGCryptography.class.php +++ b/lib/GPGCryptography.class.php @@ -48,7 +48,7 @@ public function decrypt() { return false; } $decryptFolder = sys_get_temp_dir()."/".uniqid('pdfsignature.decrypted.'.getmypid(), true); - putenv('HOME='.$decryptFolder); + putenv('HOME='.sys_get_temp_dir()); mkdir($decryptFolder); foreach ($this->getFiles(true) as $file) { $outputFile = $decryptFolder."/".str_replace(".gpg", "", basename($file)); @@ -77,9 +77,6 @@ public static function hardUnlink($element) { foreach (glob($element.'/*') as $file) { self::hardUnlink($file); } - foreach (glob($element.'/.*') as $file) { - self::hardUnlink($file); - } rmdir($element); return; }