[zi-cvs] packages/com.zzoss.plugin.lib Plugin.php,1.17,1.18
Sandro Zic <[email protected]> Wed, 07 Apr 2004 06:12:05 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.plugin.lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12475/com.zzoss.plugin.lib
Modified Files:
Plugin.php
Log Message:
deal with win files that already exist as dir
Index: Plugin.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.plugin.lib/Plugin.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Plugin.php 6 Apr 2004 20:44:11 -0000 1.17
--- Plugin.php 7 Apr 2004 06:11:57 -0000 1.18
***************
*** 76,79 ****
--- 76,89 ----
var $filelist_dirs_roles = array();
+ /**
+ * Debug mode on/off.
+ */
+ var $is_debug = false;
+
+ function setDebug($is_debug)
+ {
+ $this->is_debug = $is_debug;
+ }
+
function setDestDir($dest_dir)
{
***************
*** 401,410 ****
ZZOSS_InstallerUtils::mkDir(dirname($GLOBALS['ZI']['file_dest']));
$GLOBALS['ZI']['plugin_log'] .= 'Created directory '.dirname($GLOBALS['ZI']['file_dest'])."\n";
! } else {
! // unlink existing file
! if(file_exists($GLOBALS['ZI']['file_dest'])){
! unlink($GLOBALS['ZI']['file_dest']);
}
}
//ZZOSS_InstallerUtils::mkdir($pathinfo["dirname"]);
//$log .= 'src: '.$src. 'dest: '.$dest."\n";
--- 411,438 ----
ZZOSS_InstallerUtils::mkDir(dirname($GLOBALS['ZI']['file_dest']));
$GLOBALS['ZI']['plugin_log'] .= 'Created directory '.dirname($GLOBALS['ZI']['file_dest'])."\n";
! }
!
! if(substr(PHP_OS, 0, 3) == 'WIN'){
! // Windows case insensitivity problem:
! // We get a probem with files that have the same name as an
! // already existing directory, copied to the same root
! // directory where the already existing dir is located
! // (e.g. dir 'PEAR', file 'pear').
! if(is_dir($GLOBALS['ZI']['file_dest'])){
! if(!$this->is_debug){
! // don't procede
! break;
! } else {
! trigger_error(
! "Windows case insensitivity problem: ".
! "The file '".$GLOBALS['ZI']['file_dest']."' conflicts with already existing directory '".$GLOBALS['ZI']['file_dest']."'. ".
! "We get a probem with files that have the same name as an ".
! "already existing directory, copied to the same root ".
! "directory where the already existing dir is located. "
! );
! }
}
}
+
//ZZOSS_InstallerUtils::mkdir($pathinfo["dirname"]);
//$log .= 'src: '.$src. 'dest: '.$dest."\n";
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click