#8674 BLOC 8.2.0 (: 8.2-764, Software Update erased complete /home/olpc/Activities directory
Zarro Boogs per Child
bugtracker at laptop.org
Fri Sep 26 05:35:17 EDT 2008
#8674: 8.2-764, Software Update erased complete /home/olpc/Activities directory
--------------------------+-------------------------------------------------
Reporter: tvoverbeek | Owner: marco
Type: defect | Status: new
Priority: blocker | Milestone: 8.2.0 (was Update.2)
Component: sugar | Version: olpc-3
Resolution: | Keywords: blocks?:8.2.0
Next_action: reproduce | Verified: 0
Blockedby: | Blocking:
--------------------------+-------------------------------------------------
Comment(by tomeu):
This is the method that performs the bundle deletion:
{{{
175 def _uninstall(self, install_path):
176 if not os.path.isdir(install_path):
177 raise InvalidPathException
178 if self._unzipped_extension is not None:
179 (name_, ext) = os.path.splitext(install_path)
180 if ext != self._unzipped_extension:
181 raise InvalidPathException
182
183 for root, dirs, files in os.walk(install_path,
topdown=False):
184 for name in files:
185 os.remove(os.path.join(root, name))
186 for name in dirs:
187 os.rmdir(os.path.join(root, name))
188 os.rmdir(install_path)
}}}
For activity bundles, _unzipped_extension is '.activity' so that if a
'/home/olpc/Activities' had been passed as install_path, an exception
would have been raised and the deletion would have been aborted.
Any other idea about how this could have happened? which other code do we
have that deletes dirs recursively?
--
Ticket URL: <http://dev.laptop.org/ticket/8674#comment:3>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list