aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ZipStream.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ZipStream.php b/src/ZipStream.php
index a3a8313..6522803 100644
--- a/src/ZipStream.php
+++ b/src/ZipStream.php
@@ -1089,12 +1089,12 @@ final class Entry {
}
# check for leading slash
- if (!$path[0] == '/') {
+ if ($path[0] == '/') {
throw new PathError($path, "path contains leading slash");
}
# check for trailing slash
- if (preg_match('/\\$/', $path)) {
+ if (preg_match('/\/$/', $path)) {
throw new PathError($path, "path contains trailing slash");
}