-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable temporary directory #18658
Conversation
fix for unit test some fixes
|
||
if (!function_exists('get_temp_dir')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I guess this can cause problems or wasn't there a reason to inclide this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ... you added it as an \OC
method :)
👍 from me beside the mentioned issues. |
tmpBaseDir can be overridden for unit testing purposes
a1c1987
to
9fc6a65
Compare
9fc6a65
to
5a1619d
Compare
@owncloud-bot retest this please |
@Xenopathic where are we with that? Would be nice to have it in 8.2 |
Waiting for reviewers, cc @MorrisJobke |
* @return string | ||
* @since 8.2.0 | ||
*/ | ||
public function getTempBaseDir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@icewind1991 Isn't there already a public method to get a temp directory? What is the difference here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FFrom what I can tell this is the base folder we create the other folders in, I dont know if we need to expose this as public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the public API since the original get_temp_dir()
was accessible.
Looks good. And a very useful addition. |
I have written a documentation some months ago: owncloud-archive/documentation#779 |
A new inspection was created. |
Yep thanks for the example config. |
👍 |
Configurable temporary directory
if ($temp = sys_get_temp_dir()) return $temp; | ||
|
||
return null; | ||
return \OC::$server->getTempManager()->t_get_temp_dir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has never worked before. Introduced with #18658
This allows the temporary directory used by ownCloud to be configured in
config.php
.Replaces #16636
Fixes #14886, fixes #12910
cc @mmattel @MorrisJobke @PVince81 @DeepDiver1975