Skip to content

Commit

Permalink
[stable10] Revert server side part of #12639
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Aug 15, 2017
1 parent c5f550e commit c763d19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions apps/dav/tests/unit/Connector/Sabre/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,6 @@ public function testPutSingleFile() {
$this->assertNotEmpty($this->doPut('/foo.txt'));
}

/**
* Determine if the underlying storage supports a negative mtime value
*
* @return boolean true if negative mtime is supported
*/
private function supportsNegativeMtime() {
return !(getenv("RUN_OBJECTSTORE_TESTS") !== false);
}

public function legalMtimeProvider() {
return [
"string" => [
Expand Down Expand Up @@ -402,11 +393,11 @@ public function legalMtimeProvider() {
],
"negative int" => [
'HTTP_X_OC_MTIME' => -34,
'expected result' => ($this->supportsNegativeMtime() ? -34 : 0)
'expected result' => -34
],
"negative float" => [
'HTTP_X_OC_MTIME' => -34.43,
'expected result' => ($this->supportsNegativeMtime() ? -34 : 0)
'expected result' => -34
],
];
}
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function getPermissions($path) {

public function filemtime($path) {
$stat = $this->stat($path);
if (isset($stat['mtime']) && $stat['mtime'] > 0) {
if (isset($stat['mtime'])) {
return $stat['mtime'];
} else {
return 0;
Expand Down

0 comments on commit c763d19

Please sign in to comment.