mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fix couple of bugs in DependenciesFolder
We need to overwrite files when copying to App_Data/Dependencies folder. We need to compare modification date, not creation date when deciding to copy a file to the App_Data/Dependencies folder. --HG-- branch : dev
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Orchard.FileSystems.Dependencies {
|
||||
if (IsNewerAssembly(assemblyName, assemblyFileName)) {
|
||||
var destinationFileName = Path.GetFileName(assemblyFileName);
|
||||
var destinationPath = _virtualPathProvider.MapPath(_virtualPathProvider.Combine(BasePath, destinationFileName));
|
||||
File.Copy(assemblyFileName, destinationPath);
|
||||
File.Copy(assemblyFileName, destinationPath, true);
|
||||
|
||||
StoreDepencyInformation(assemblyName, destinationFileName);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ namespace Orchard.FileSystems.Dependencies {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (File.GetCreationTimeUtc(existingFileName) <= File.GetCreationTimeUtc(assemblyFileName));
|
||||
return (File.GetLastWriteTimeUtc(existingFileName) < File.GetLastWriteTimeUtc(assemblyFileName));
|
||||
}
|
||||
|
||||
private void StoreDepencyInformation(string name, string fileName) {
|
||||
|
||||
Reference in New Issue
Block a user