diff options
author | Ajay Garg <ajay@activitycentral.com> | 2012-05-16 13:32:41 (GMT) |
---|---|---|
committer | Anish Mangal <anish@activitycentral.com> | 2012-05-17 18:02:05 (GMT) |
commit | 2711898eaba268c3583d08a94463ac7a053a28f2 (patch) | |
tree | 66cf0a0087cc584a456e8fc7b50340b9182560e4 | |
parent | e27a8a7b0bf78bb2f3bc7032d5d663b94facf18a (diff) |
sl#3605: Do not rely on 'mountpoint' property being present in the metadata per entry. Instead use the global API.
-rw-r--r-- | src/jarabe/journal/model.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py index 527f78d..1f042db 100644 --- a/src/jarabe/journal/model.py +++ b/src/jarabe/journal/model.py @@ -1003,7 +1003,13 @@ def is_editable(metadata): if metadata.get('mountpoint', '/') == '/': return True else: - return os.access(metadata['mountpoint'], os.W_OK) + # sl#3605: Instead of relying on mountpoint property being + # present in the metadata, use journalactivity api. + # This would work seamlessly, as "Details View' is + # called, upon an entry in the context of a singular + # mount-point. + from jarabe.journal.journalactivity import get_mount_point + return os.access(get_mount_point(), os.W_OK) def get_documents_path(): |