Borrar filtros
Borrar filtros

Warning: Temporary folder could not be deleted

30 visualizaciones (últimos 30 días)
Craig Lent
Craig Lent el 7 de Jul. de 2020
Editada: Dmitry Kaplan el 23 de Jul. de 2022
Every time I save the app source, I get a new directory in the current directory with a name like appDesignerTempData_964888535199
and an error message:
Warning: Temporary folder C:\Users\lent\Dropbox\MATLABappdesigner\BasicSliderPlot\appDesignerTempData_964888535199 could not be deleted.
Please delete manually.
(Bold face is the current folder)
They accumulate.
I tried running as administrator and it doesn't help.
How do I get this temporary file creation to stop?
  9 comentarios
Craig Lent
Craig Lent el 2 de Abr. de 2021
Still a problem in 2021a
Dmitry Kaplan
Dmitry Kaplan el 23 de Jul. de 2022
Editada: Dmitry Kaplan el 23 de Jul. de 2022
Still a problem in R2022a. I believe also that it's the interaction between Dropbox and Matlab, but not simply due to a cloud backup -- more like preparing for a cloud backup... I think... (because I don't see any backup activity on those). See my suggestion below for a change to the serialization code that moves the backup directories to the temp directory, where it truly belongs. I don't feel qualified suggesting it as an answer since the files involved are in a write-only directory and the whole 'temp' vs 'tmp', win/pc/apple/whatever associated issues.

Iniciar sesión para comentar.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 2 de Abr. de 2021
I suspect this has to do with you saving to a Dropbox folder. My guess is that Dropbox is doing something with the file when MATLAB tries to delete it (likely actively syncing it to the cloud).
You might be able to confirm this by saving your source to a folder that is not in your Dropbox folder and see if you still get the same warning.
  1 comentario
Dmitry Kaplan
Dmitry Kaplan el 23 de Jul. de 2022
Editada: Dmitry Kaplan el 23 de Jul. de 2022
I think it is the interaction between matlab and dropbox that's the problem. I suspect this will be a problem with many continuous backup systems. Matlab can easily address this by storing the appDesignerTempData where it belongs -- in a "temp" directory, not in pwd(). Or let us pick the location.
Another option may be in fileWriter.m in appdesigner\+appdesigner\+internal\+serialization
% create a random folder name so no existing folders are affected
randomNumber = floor(rand*1e12);
testDirPrefix = 'appDesignerTempData_';
% START NEW: may want to consider something like
if ~isempty(getenv('Temp'))
testDirPrefix = fullfile(getenv('Temp'),testDirPrefix);
end
% END NEW
testDir = [testDirPrefix, num2str(randomNumber)];

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by