summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/TAssetManager.php24
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);
}
/**