Tilde(~) in Path Breaks CI4 (used in iCloud Drive Path) |
The issue is caused by the sanitizeFilename method on line 301 of the file vendor/codeigniter4/framework/system/Autoloader/Autoloader.php. The function transforms a path such as /com~apple~CloudDocs/sites, which is perfectly legitimate on a Mac, into /comappleCloudDocs/sites, rendering all paths invalid.
I solved the issue by changing line 307: PHP Code: $filename = preg_replace('/[^0-9\p{L}\s\/\-\_\.\:\\\\]/u', '', $filename); PHP Code: $filename = preg_replace('/[^0-9\p{L}\s\/\-\_\.\:\\\\~]/u', '', $filename); |
Welcome Guest, Not a member yet? Register Sign In |