-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autosave function create .tmp files into /weio #270
Comments
What's the content of these files ? Can you paste one here ? |
The content is my code. Exactly my Code of my main.py and index.html. Like Copy & Paste. |
Update: Not just when an error occurs. They seem to be randomly created. Not at every error, just sometimes. AND not every time but sometimes when running a program. |
The autosave function create a temporary file each 4 seconds. This is really bad for the flash memory. A solution must be found quickly to fix this problem. |
@ukicar please think to completely disable autosave function. Saving all the time something to the flash wears the flash, as it has a limited number of writes. If something has to be saved temporarely, you must always use RAM. But I think for this purpose, it would be best to remove auto-save option all together. @nmarcetic opinions? |
👍 to remove auto-save We can keep the CTRL-S function, and modify writeRawContentToFile either that way def saveRawContentToFile(path, data):
try :
inputFile = open(path, 'w')
print(inputFile)
ret = inputFile.write(data)
inputFile.close()
except:
return -1
return 0 or that way : def saveRawContentToFile(path, data):
tmp = "/tmp/"+str(uuid.uuid1())+".tmp"
try :
inputFile = open(tmp, 'w')
print(inputFile)
ret = inputFile.write(data)
inputFile.close()
except:
os.remove(tmp)
return -1
move(tmp, path)
return 0 |
This is extremely critical bug. I decided to really deactivate autoSave as it's not really necessary. When we want to play it will save, when we want to change the project it will save it first (I just added this feature) and when we preview it will save it. Finally we can manually save by CTRL-S. It's pretty enough i think Thanks Paul for your propositions specially about saving to the temp before copying to the flash (I integrated that too). Deactivating AutoSave in JS Save project before changing the project or creating new etc.. Copy to the /tmp before copying to the flash @ks156 @drasko For me it's OK I tested. Please confirm that is ok before closing this bug |
Ok for me. Thanks |
When I get any kind of error with my weio, there are a lot of " *.tmp " files created in the root.
I am talking about a couple hundred in a few minutes.
The text was updated successfully, but these errors were encountered: