lib/private/Files/Storage/Wrapper/Encoding.php
/**
	 * Checks whether the last path section of the given path exists in NFC or NFD form
	 * and returns the correct form. If no existing path found, returns null.
	 *
	 * @param string $basePath base path to check
	 * @param string $lastSection last section of the path to check for NFD/NFC variations
	 *
	 * @return string|null original or converted path, or null if none of the forms was found
	 */
Checks whether the last path section of the given path exists in NFC or NFD form
and returns the correct form. If no existing path found, returns null.

@param string $basePath base path to check
@param string $lastSection last section of the path to check for NFD/NFC variations

@return string|null original or converted path, or null if none of the forms was found
Checks whether the last path section of the given path exists in NFC or NFD form and returns the correct form . If no existing path found returns null . @param string $basePath base path to check @param string $lastSection last section of the path to check for NFD / NFC variations @return string|null original or converted path or null if none of the forms was found
private function findPathToUseLastSection($basePath, $lastSection) {
		$fullPath = $basePath . $lastSection;
		if ($lastSection === '' || $this->isAscii($lastSection) || $this->storage->file_exists($fullPath)) {
			$this->namesCache[$fullPath] = $fullPath;
			return $fullPath;
		}
		if (\Normalizer::isNormalized($lastSection, \Normalizer::FORM_C)) {
			$otherFormPath = \Normalizer::normalize($lastSection, \Normalizer::FORM_D);
		} else {
			$otherFormPath = \Normalizer::normalize($lastSection, \Normalizer::FORM_C);
		}
		$otherFullPath = $basePath . $otherFormPath;
		if ($this->storage->file_exists($otherFullPath)) {
			$this->namesCache[$fullPath] = $otherFullPath;
			return $otherFullPath;
		}
		$this->namesCache[$fullPath] = $fullPath;
		return null;
	}
private function findPathToUseLastSection ( $ basePath , $ lastSection ) { $ fullPath = $ basePath . $ lastSection ; if ( $ lastSection === '' || $ this -> isAscii ( $ lastSection ) || $ this -> storage -> file_exists ( $ fullPath ) ) { $ this -> namesCache [ $ fullPath ] = $ fullPath ; return $ fullPath ; } if ( \ Normalizer :: isNormalized ( $ lastSection , \ Normalizer :: FORM_C ) ) { $ otherFormPath = \ Normalizer :: normalize ( $ lastSection , \ Normalizer :: FORM_D ) ; } else { $ otherFormPath = \ Normalizer :: normalize ( $ lastSection , \ Normalizer :: FORM_C ) ; } $ otherFullPath = $ basePath . $ otherFormPath ; if ( $ this -> storage -> file_exists ( $ otherFullPath ) ) { $ this -> namesCache [ $ fullPath ] = $ otherFullPath ; return $ otherFullPath ; } $ this -> namesCache [ $ fullPath ] = $ fullPath ; return null ; }
Checks whether the last path section of the given path exists in NFC or NFD form
 and returns the correct form.
Checks whether the last path section of the given path exists in NFC or NFD form and returns the correct form .
// swap encoding // return original path, file did not exist at all