r - 临时目录被删除后本地闪亮的应用程序崩溃
问题描述
我在我的 Windows 机器上本地运行一个闪亮的应用程序,它每天使用批处理文件自动运行。我最近遇到了一个问题,其中 R tmp 目录 /tmp/RtmpXXXXX 被删除并且应用程序失败:
Warning in file(open = "w+b", encoding = "UTF-8") :
cannot open file
'C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT\Rf140c40ab30be': No such file
or directory # deleted file
Warning in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT": The system cannot
find the file specified # deleted folder
Warning in file(open = "w+") :
cannot open file
'C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT\Rf140c38044f8': No such file
or directory
Warning: Error in file: cannot open the connection # program crashes
Stack trace (innermost first):
1: runApp
Error : cannot open the connection
我应该如何管理在一定时间后自动删除的临时目录?我尝试更改文件路径以查看是否可以解决问题,但这没有用。
解决方案
我运行procmon并注意到 WindowsDisk Cleanup
几乎每天都在自动删除临时文件,影响会话的临时目录并导致闪亮的应用程序崩溃。
要禁用此自动计划任务:
- 打开任务计划程序
- 向下钻取到任务计划程序库 > Microsoft > Windows
- 点击
DiskCleanup
- 在右侧窗格中单击禁用
推荐阅读
- powershell - 如何在不将其转换为数组的情况下返回多个值?
- r - 没有将 y 轴值加在一起的堆积条形图 (ggplot2)
- c++ - 在 Teensy 3.6 上使用 ADC
- puppet - Puppet contains not working to order class 包含
- php - MacOS Catalina:找不到类“ZipArchive”
- javascript - 使用 puppeteer 将一段文本分解为对象数组
- hive - 是否可以将配置单元表格式转换为 ORC 并使其分桶
- css - 带粘性标题的角材料表
- reactjs - React update 来自另一个组件的无状态组件
- python - 用选定的列表值填充数据框中的列