|
@@ 1190-1194 (lines=5) @@
|
| 1187 |
|
$result = $storage->$operation($internalPath); |
| 1188 |
|
} |
| 1189 |
|
} catch (\Exception $e) { |
| 1190 |
|
if (in_array('write', $hooks) || in_array('delete', $hooks)) { |
| 1191 |
|
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE); |
| 1192 |
|
} else if (in_array('read', $hooks)) { |
| 1193 |
|
$this->unlockFile($path, ILockingProvider::LOCK_SHARED); |
| 1194 |
|
} |
| 1195 |
|
throw $e; |
| 1196 |
|
} |
| 1197 |
|
|
|
@@ 1218-1222 (lines=5) @@
|
| 1215 |
|
// make sure our unlocking callback will still be called if connection is aborted |
| 1216 |
|
ignore_user_abort(true); |
| 1217 |
|
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) { |
| 1218 |
|
if (in_array('write', $hooks)) { |
| 1219 |
|
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE); |
| 1220 |
|
} else if (in_array('read', $hooks)) { |
| 1221 |
|
$this->unlockFile($path, ILockingProvider::LOCK_SHARED); |
| 1222 |
|
} |
| 1223 |
|
}); |
| 1224 |
|
} |
| 1225 |
|
|
|
@@ 1232-1236 (lines=5) @@
|
| 1229 |
|
} |
| 1230 |
|
} |
| 1231 |
|
|
| 1232 |
|
if (!$unlockLater |
| 1233 |
|
&& (in_array('write', $hooks) || in_array('delete', $hooks) || in_array('read', $hooks)) |
| 1234 |
|
) { |
| 1235 |
|
$this->unlockFile($path, ILockingProvider::LOCK_SHARED); |
| 1236 |
|
} |
| 1237 |
|
return $result; |
| 1238 |
|
} else { |
| 1239 |
|
$this->unlockFile($path, ILockingProvider::LOCK_SHARED); |