From 1e38eb441a8ea0dcff367945dc78395e6e80c80b Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 13 Nov 2013 17:20:24 +0000 Subject: 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. Fixes #4656 Signed-off-by: Gustavo Duarte --- 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: -- cgit v0.9.1