File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -226,15 +226,21 @@ public function allowShareFolder()
226226 }
227227
228228 /**
229- * Translate file name to make it compatible on Windows.
229+ * Translate file or directory name(s) to be compatible on Windows.
230230 *
231- * @param string $input Any string.
232- * @return string
231+ * @param string|array $input Any string or array of strings .
232+ * @return string|array
233233 */
234234 public function translateFromUtf8 ($ input )
235235 {
236236 if ($ this ->isRunningOnWindows ()) {
237- $ input = iconv ('UTF-8 ' , mb_detect_encoding ($ input ), $ input );
237+ if (is_array ($ input )) {
238+ foreach ($ input as &$ item ) {
239+ $ item = iconv ('UTF-8 ' , mb_detect_encoding ($ item ), $ item );
240+ }
241+ } else {
242+ $ input = iconv ('UTF-8 ' , mb_detect_encoding ($ input ), $ input );
243+ }
238244 }
239245
240246 return $ input ;
You can’t perform that action at this time.
0 commit comments