-
Notifications
You must be signed in to change notification settings - Fork 179
Empty the acloud_cvd_temp dir on cvd reset. #1485
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,6 +158,11 @@ class CvdResetCommandHandler : public CvdCommandHandler { | |
| } | ||
| CF_EXPECT(KillAllCuttlefishInstances( | ||
| /* clear_instance_dirs*/ options.clean_runtime_dir)); | ||
|
|
||
| if (DirectoryExists("/tmp/acloud_cvd_temp/")) { | ||
| CF_EXPECT(RecursivelyRemoveDirectory("/tmp/acloud_cvd_temp/")); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it seem worth it to delete the contents of this directory without deleting the directory itself? I could imagine a user changing the directory permissions of this to facilitate some multi-user interaction, though it would have to be reset on every reboot anyway since
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may not be worth the effort. If we want to support the multi-user case better, then we probably need to improve the directory structure here and maybe put some of these files elsewhere, but that's a larger change. But I'm happy to make the adjustment if you think it's worthwhile.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the structure has other downsides, it breaks compatibility with python acloud. Might as well delete it then. |
||
| } | ||
|
|
||
| return {}; | ||
| } | ||
| cvd_common::Args CmdList() const override { return {kResetSubcmd}; } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there are already 3 non-test occurrences of this string, maybe worth making a shared constant in a new file somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'll be the next pr after this one. ;)