svnno****@sourc*****
svnno****@sourc*****
2010年 5月 6日 (木) 17:53:20 JST
Revision: 103 http://sourceforge.jp/projects/frameworkspider/svn/view?view=rev&revision=103 Author: m_nakashima Date: 2010-05-06 17:53:20 +0900 (Thu, 06 May 2010) Log Message: ----------- Windowsドライブパス問題の再修正 Modified Paths: -------------- current/spider/lib/spider/BuildInformation.class.php -------------- next part -------------- Modified: current/spider/lib/spider/BuildInformation.class.php =================================================================== --- current/spider/lib/spider/BuildInformation.class.php 2010-05-01 12:51:47 UTC (rev 102) +++ current/spider/lib/spider/BuildInformation.class.php 2010-05-06 08:53:20 UTC (rev 103) @@ -95,10 +95,10 @@ */ function getAgentPageBuildFilePath() { $virtual_root = APPLICATION_BASE_PATH; - if( preg_match('/^[a-zA-Z]\\:\\\\/', APPLICATION_BASE_PATH, $regmatch_array ) ) { + if( preg_match('/^[a-zA-Z]\\:/', APPLICATION_BASE_PATH, $regmatch_array ) ) { // Windows対策ドライブをディレクトリとして変換 $drive_name = substr($regmatch_array[0],0,1); - $virtual_root = preg_replace('/^[a-zA-Z]\\:\\\\/' + $virtual_root = preg_replace('/^[a-zA-Z]\\:/' ,$drive_name.DIRECTORY_SEPARATOR,$virtual_root ); } else { $virtual_root = substr($virtual_root,1); @@ -106,10 +106,10 @@ // 2009-12-16 実行ファイル作成パスをspiderの上層ディレクトリ起点とする if( !defined('SPIDER_USE_ABSOLUTE_BIN_PATH') || SPIDER_USE_ABSOLUTE_BIN_PATH === false ) { $cutPath = dirname(DIR_PATH_SPIDER_DATA); - if( preg_match('/^[a-zA-Z]\\:\\\\/', APPLICATION_BASE_PATH, $regmatch_array ) > 0 ) { + if( preg_match('/^[a-zA-Z]\\:/', APPLICATION_BASE_PATH, $regmatch_array ) > 0 ) { // Windows対策ドライブをディレクトリとして変換 $driveName = substr($regmatch_array[0],0,1); - $cutPath = preg_replace('/^[a-zA-Z]\\:\\\\/' + $cutPath = preg_replace('/^[a-zA-Z]\\:/' ,$driveName.DIRECTORY_SEPARATOR, $cutPath ); } $virtual_root = preg_replace('/^'.util_CharUtility::escapeRegxStr($cutPath).'/','',$virtual_root); @@ -155,7 +155,7 @@ $target_dir = str_replace("\\",DIRECTORY_SEPARATOR,$target_dir); $dir_name_array = explode(DIRECTORY_SEPARATOR,$target_dir ); $dir_path = ''; - if( preg_match('/^[a-zA-Z]\\:\\\\/',$target_dir) ) { + if( preg_match('/^[a-zA-Z]\\:/',$target_dir) ) { // Windowsなら頭にセパレータをつけないのでそのまま } else { // Unix系ならパスはディレクトリセパレータから開始