|
@@ 167-173 (lines=7) @@
|
| 164 |
|
$newmtime = $this->view->filemtime($path); |
| 165 |
|
$newsize = $this->view->filesize($path); |
| 166 |
|
return new DataResponse(['mtime' => $newmtime, 'size' => $newsize], Http::STATUS_OK); |
| 167 |
|
} else { |
| 168 |
|
// Not writeable! |
| 169 |
|
$this->logger->error('User does not have permission to write to file: ' . $path, |
| 170 |
|
['app' => 'files_texteditor']); |
| 171 |
|
return new DataResponse([ 'message' => $this->l->t('Insufficient permissions')], |
| 172 |
|
Http::STATUS_BAD_REQUEST); |
| 173 |
|
} |
| 174 |
|
} |
| 175 |
|
} else if ($path === '') { |
| 176 |
|
$this->logger->error('No file path supplied'); |
|
@@ 178-181 (lines=4) @@
|
| 175 |
|
} else if ($path === '') { |
| 176 |
|
$this->logger->error('No file path supplied'); |
| 177 |
|
return new DataResponse(['message' => $this->l->t('File path not supplied')], Http::STATUS_BAD_REQUEST); |
| 178 |
|
} else { |
| 179 |
|
$this->logger->error('No file mtime supplied', ['app' => 'files_texteditor']); |
| 180 |
|
return new DataResponse(['message' => $this->l->t('File mtime not supplied')], Http::STATUS_BAD_REQUEST); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
} catch (HintException $e) { |
| 184 |
|
$message = (string)$e->getHint(); |