更新下载文件最后修改时间

This commit is contained in:
hehaibing-1996
2025-02-21 22:34:45 +08:00
parent e1717145a9
commit 3adf965716

View File

@ -295,6 +295,10 @@ namespace 智慧物流软件系统.ViewModel
var sourcePath = Path.Combine(LocalFile.ResourcesDir, "物料绑定导入模板.xlsx");
Folder.CopyFile(sourcePath, destinationPath);
// 更新文件的最后修改时间(通常设置为当前时间)
File.SetLastWriteTime(destinationPath, DateTime.Now);
if (File.Exists(destinationPath) && LocalFile.Config.IsLoadingDownloadPath)
{
LocalFile.Config.BatchBindImportTemplatePath = destinationPath;