Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-11-13 17:20:24 (GMT)
committer Gustavo Duarte <gduarte@activitycentral.com>2013-12-12 11:59:41 (GMT)
commit1e38eb441a8ea0dcff367945dc78395e6e80c80b (patch)
tree94ad319177a15e62666e7ed2baebb22c9fd89c45
parent3b10c456b72df1905563ac269d807835b0f45a51 (diff)
The set hidden attribute ioctl doesn't work for ~/Documents/.Sugar-Metadata, however it is not necessary to apply the flag, since it is a Linux file system. This patch checks to see if the destination of the copy is ~/Documents, and if so, skips the ioctl.old-activities-backguard-compatibility
Fixes #4656 Signed-off-by: Gustavo Duarte <gduarte@activitycentral.com>
-rw-r--r--src/jarabe/journal/model.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index f8b39a4..5bd64e9 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -1070,10 +1070,11 @@ def _write_metadata_and_preview_files_and_return_file_paths(metadata,
os.mkdir(metadata_dir_path)
# Set the HIDDEN attrib even when the metadata directory already
- # exists for backward compatibility.
- if not SugarExt.fat_set_hidden_attrib(metadata_dir_path):
- logging.error('Could not set hidden attribute on %s' %
- (metadata_dir_path))
+ # exists for backward compatibility; but don't set it in ~/Documents
+ if not metadata['mountpoint'] == get_documents_path():
+ if not SugarExt.fat_set_hidden_attrib(metadata_dir_path):
+ logging.error('Could not set hidden attribute on %s' %
+ (metadata_dir_path))
preview = None
if 'preview' in metadata_copy: