-
-
Notifications
You must be signed in to change notification settings - Fork 141
on livesync delete empty folders on exit #821
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
Conversation
💚 |
targetFile.delete(); | ||
} else { | ||
deleteRemovedFiles(file, sourceRootAbsolutePath, targetRootAbsolutePath); | ||
if (targetFile.listFiles().length == 0) { |
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.
Could you add a comment why that is necessary?
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.
It cleans the empty folders after it's done deleting files.
It's not necessary, I just did it so we don't pollute the device with empty folders. Plus to keep behavior the same as on iOS devices.
I'll comment it in the code no problem.
💚 |
} else { | ||
deleteRemovedFiles(file, sourceRootAbsolutePath, targetRootAbsolutePath); | ||
|
||
// this is done so empty folders, if any, are deleted after we're don deleting files. |
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.
The comment is only present in the test-app class. Could you do the same for the build template?
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.
F!@@#%!%$!@#
💚 |
Runtime deletes unnecessary folders on livesync
problem
When CLI livesyncs, android runtime needs to remove old files and it does, but it leaves empty folders
solution
check if folders are empty on exit and delete if so