File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -82,19 +82,20 @@ public function getPath($readonly = false)
8282 if (!isset ($ this ->tmp [ $ full_path_hash ]) || (!@file_exists ($ full_path ) || !@is_writable ($ full_path ))) {
8383 if (!@file_exists ($ full_path )) {
8484 @mkdir ($ full_path , $ this ->setChmodAuto (), true );
85- }else if (!@is_writable ($ full_path )) {
86- @chmod ($ full_path , $ this ->setChmodAuto ());
87- }
88- if (!@ is_writable ( $ full_path )) {
89- /**
90- * Switch back to tmp dir
91- * again if the path is not writable
92- */
93- $ full_path = $ full_path_tmp ;
94- if (!@ file_exists ($ full_path)) {
95- @ mkdir ( $ full_path , $ this -> setChmodAuto (), true );
85+ }elseif (!@is_writable ($ full_path )) {
86+ if (! @chmod ($ full_path , $ this ->setChmodAuto ()))
87+ {
88+ /**
89+ * Switch back to tmp dir
90+ * again if the path is not writable
91+ */
92+ $ full_path = $ full_path_tmp ;
93+ if (!@ file_exists ( $ full_path )) {
94+ @ mkdir ($ full_path, $ this -> setChmodAuto (), true );
95+ }
9696 }
9797 }
98+
9899 /**
99100 * In case there is no directory
100101 * writable including tye temporary
You can’t perform that action at this time.
0 commit comments