summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-07-08 15:55:17 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-07-08 15:55:17 +0200
commitc2d88a08b796ca19c8b5ec63bfd34ac32ead4208 (patch)
treef18e0ba4d05361456a6712378ccc0784620c1e9c /lib/private/Files
parent48f9e4ed03f3148d62919a95496ee43164d3e707 (diff)
downloadnextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.tar.gz
nextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.zip
Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
Diffstat (limited to 'lib/private/Files')
-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);
}
/**