Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Lewis <jtl1728@rit.edu>2009-12-14 21:39:31 (GMT)
committer Justin Lewis <jtl1728@rit.edu>2009-12-14 21:39:31 (GMT)
commit5144012631db48d9bf78610b8b538ae2b27b02f6 (patch)
tree4dca4ed1b086053aa199b8dd97939af704cacf1b
parent6729239550d9fa2ffa942b7febd9fee587df7bb8 (diff)
Remove file bundle from activity store if removed from file list
-rw-r--r--FileShare.activity/FileShareActivity.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/FileShare.activity/FileShareActivity.py b/FileShare.activity/FileShareActivity.py
index 9b7da03..f4d813d 100644
--- a/FileShare.activity/FileShareActivity.py
+++ b/FileShare.activity/FileShareActivity.py
@@ -77,7 +77,6 @@ class FileShareActivity(Activity):
chooser = ObjectChooser()
try:
if chooser.run() == gtk.RESPONSE_ACCEPT:
-
# get object and build file
jobject = chooser.get_selected_object()
@@ -138,6 +137,15 @@ class FileShareActivity(Activity):
key = model.get_value(iter, 0)
self._remFileFromUIList(key)
+ # Attempt to remove file from system
+ bundle_path = os.path.join(self._filepath, '%s.xoj' % key)
+
+ try:
+ os.remove( bundle_path )
+ except:
+ _logger.warn("Could not remove file from system: %d",bundle_path)
+
+
def requestDownloadFile(self, widget, data=None):
_logger.info('Requesting to Download file')
if self.treeview.get_selection().count_selected_rows() != 0: