diff options
author | knut <> | 2007-06-18 20:25:38 +0000 |
---|---|---|
committer | knut <> | 2007-06-18 20:25:38 +0000 |
commit | 840d142703025927bd2fc5ffd70fcf62b0dccb76 (patch) | |
tree | c44b5c8d0772bee0463efb1d5c9273b406649945 /framework/Web/TAssetManager.php | |
parent | fe75acc9c6bfc76ce70e5e892cbf59c94f374ac5 (diff) |
fixed #654
Diffstat (limited to 'framework/Web/TAssetManager.php')
-rw-r--r-- | framework/Web/TAssetManager.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php index d0769a0a..c71ea449 100644 --- a/framework/Web/TAssetManager.php +++ b/framework/Web/TAssetManager.php @@ -258,20 +258,24 @@ class TAssetManager extends TModule @mkdir($dst);
@chmod($dst, PRADO_CHMOD);
}
- $folder=@opendir($src);
- while($file=@readdir($folder))
+ if($folder=@opendir($src))
{
- if($file==='.' || $file==='..' || $file==='.svn')
- continue;
- else if(is_file($src.'/'.$file))
+ while($file=@readdir($folder))
{
- if(@filemtime($dst.'/'.$file)<@filemtime($src.'/'.$file))
- @copy($src.'/'.$file,$dst.'/'.$file);
+ if($file==='.' || $file==='..' || $file==='.svn')
+ continue;
+ else if(is_file($src.'/'.$file))
+ {
+ if(@filemtime($dst.'/'.$file)<@filemtime($src.'/'.$file))
+ @copy($src.'/'.$file,$dst.'/'.$file);
+ }
+ else
+ $this->copyDirectory($src.'/'.$file,$dst.'/'.$file);
}
- else
- $this->copyDirectory($src.'/'.$file,$dst.'/'.$file);
+ closedir($folder);
+ } else {
+ throw new TInvalidDataValueException('assetmanager_source_directory_invalid', $src);
}
- closedir($folder);
}
/**
|