summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Common.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-07-11 13:16:03 +0200
committerGitHub <noreply@github.com>2016-07-11 13:16:03 +0200
commit0c1cf5f7eb15532901aa3b4f29a4e3ee5fa58467 (patch)
tree1503a3a06e94d9f36b1675a0b4f46284c0f83b23 /lib/private/Files/Storage/Common.php
parent34c0b9d2c02f787b46dd27af66ab2726d6024636 (diff)
parent6ea77abb38e4b85556ccde8801071f5f10a92ced (diff)
downloadnextcloud-server-0c1cf5f7eb15532901aa3b4f29a4e3ee5fa58467.tar.gz
nextcloud-server-0c1cf5f7eb15532901aa3b4f29a4e3ee5fa58467.zip
Merge pull request #347 from nextcloud/drop-windows-foo
Remove unneeded checks if it runs on a Windows machine
Diffstat (limited to 'lib/private/Files/Storage/Common.php')
-rw-r--r--lib/private/Files/Storage/Common.php20
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 0c1b69108d4..6c4013d2acb 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -489,25 +489,7 @@ abstract class Common implements Storage, ILockingStorage {
}
// NOTE: $path will remain unverified for now
- if (\OC_Util::runningOnWindows()) {
- $this->verifyWindowsPath($fileName);
- } else {
- $this->verifyPosixPath($fileName);
- }
- }
-
- /**
- * https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
- * @param string $fileName
- * @throws InvalidPathException
- */
- protected function verifyWindowsPath($fileName) {
- $fileName = trim($fileName);
- $this->scanForInvalidCharacters($fileName, "\\/<>:\"|?*");
- $reservedNames = ['CON', 'PRN', 'AUX', 'NUL', 'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9'];
- if (in_array(strtoupper($fileName), $reservedNames)) {
- throw new ReservedWordException();
- }
+ $this->verifyPosixPath($fileName);
}
/**