function _drush_convert_path

8.0.x _drush_convert_path($path)
6.x _drush_convert_path($path)
7.x _drush_convert_path($path)
3.x _drush_convert_path($path)
4.x _drush_convert_path($path)
5.x _drush_convert_path($path)
master _drush_convert_path($path)

Converts a Windows path (dir1\dir2\dir3) into a Unix path (dir1/dir2/dir3). Also converts a cygwin "drive emulation" path (/cygdrive/c/dir1) into a proper drive path, still with Unix slashes (c:/dir1).

1 call to _drush_convert_path()
_drush_bootstrap_selected_uri in includes/
Find the URI that has been selected by the cwd if it was not previously set via the --uri / -l option


includes/, line 150
Functions used by drush to query the environment and setting the current configuration.


function _drush_convert_path($path) {
  $path = str_replace('\\', '/', $path);
  if (drush_is_windows(_drush_get_os()) && !drush_is_cygwin(_drush_get_os())) {
    $path = preg_replace('/^\/cygdrive\/([A-Za-z])(.*)$/', '\1:\2', $path);

  return $path;