Skip to content

fixing php 32 bit (arm) filemtime on large file issue (#18971) (#25428)#1890

Merged
MorrisJobke merged 3 commits into
masterfrom
downstream-25428
Oct 25, 2016
Merged

fixing php 32 bit (arm) filemtime on large file issue (#18971) (#25428)#1890
MorrisJobke merged 3 commits into
masterfrom
downstream-25428

Conversation

@MorrisJobke

Copy link
Copy Markdown
Member

@MorrisJobke MorrisJobke added 3. to review Waiting for reviews downstream labels Oct 24, 2016
@MorrisJobke MorrisJobke added this to the Nextcloud 11.0 milestone Oct 24, 2016
Comment thread lib/private/Files/Storage/Local.php Outdated
return false;
}
if (PHP_INT_SIZE === 4) {
return (int) exec ('stat -c %Y '. escapeshellarg ($fullPath));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should IMO be in \OC\LargeFileHelper

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll adjust that.

Comment thread lib/private/Files/Storage/Local.php Outdated
return false;
}
if (PHP_INT_SIZE === 4) {
return (int) exec ('stat -c %Y '. escapeshellarg ($fullPath));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll adjust that.

* fixing php 32 bit (arm) filemtime on large file issue (#18971)

* cast to int
@LukasReschke LukasReschke dismissed their stale review October 25, 2016 09:43

Adjusted as reviewed by myself.

@LukasReschke

Copy link
Copy Markdown
Member

I changed this as pointed out. 👍 from me now.

@nickvergessen

Copy link
Copy Markdown
Member

Much cleaner

👍

@nickvergessen nickvergessen added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 25, 2016
@rullzer

rullzer commented Oct 25, 2016

Copy link
Copy Markdown
Member

Lets do this
👍

Comment thread lib/private/LargeFileHelper.php Outdated
*/
public function getFileMtime($fullPath) {
if (\OC_Helper::is_function_enabled('exec')) {
return $this->exec('stat -c %Y ' . escapeshellarg($fullPath));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails on OS X so we also need some more fallbacks here as it may also fail on other BSD and Linux derivates here. Awesome 🚀

@nickvergessen nickvergessen added 1. to develop Accepted and waiting to be taken care of and removed 4. to release Ready to be released and/or waiting for tests to finish labels Oct 25, 2016
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
@LukasReschke LukasReschke added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Oct 25, 2016
@MorrisJobke

Copy link
Copy Markdown
Member Author

👍

@MorrisJobke MorrisJobke merged commit 27ba46c into master Oct 25, 2016
@MorrisJobke MorrisJobke deleted the downstream-25428 branch October 25, 2016 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants