diff options
author | Ajay Garg <ajay@activitycentral.com> | 2012-09-20 07:52:02 (GMT) |
---|---|---|
committer | Ajay Garg <ajay@activitycentral.com> | 2012-09-20 07:52:02 (GMT) |
commit | 031d7fdce214ac33aa497432b1599344f87dd59d (patch) | |
tree | bc6893873842752139bcf5a246226258f93740f0 | |
parent | 9f3b3b82f306dd33284c18b7bacdd1e547845f51 (diff) |
sdxo#2339: Metadata-and-Preview files must never be deleted for remote-shares (when moving the data-file).
-rw-r--r-- | rpms/sugar/0144-sdxo-2339-Metadata-and-Preview-files-must-never-be-d.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/rpms/sugar/0144-sdxo-2339-Metadata-and-Preview-files-must-never-be-d.patch b/rpms/sugar/0144-sdxo-2339-Metadata-and-Preview-files-must-never-be-d.patch new file mode 100644 index 0000000..112bbca --- /dev/null +++ b/rpms/sugar/0144-sdxo-2339-Metadata-and-Preview-files-must-never-be-d.patch @@ -0,0 +1,41 @@ +From bb19c8b97bfbe0d4af22724714da46e4f2b22319 Mon Sep 17 00:00:00 2001 +From: Ajay Garg <ajay@activitycentral.com> +Date: Thu, 20 Sep 2012 13:19:56 +0530 +Subject: [PATCH] sdxo#2339: Metadata-and-Preview files must never be deleted for remote-shares (when moving the data-file). +Organization: Sugar Labs Foundation +Signed-off-by: Ajay Garg <ajay@activitycentral.com> +--- + src/jarabe/journal/model.py | 10 +++++++++- + 1 files changed, 9 insertions(+), 1 deletions(-) + +diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py +index 1a47556..e0c0620 100644 +--- a/src/jarabe/journal/model.py ++++ b/src/jarabe/journal/model.py +@@ -978,6 +978,14 @@ def _rename_entry_on_external_device(file_path, destination_path): + return + + from jarabe.journal.journalactivity import get_mount_point ++ ++ # Also, as a special case, the metadata- and preview-files of ++ # the remote-shares must never be deleted. For them, only the ++ # data-file needs to be moved. ++ if is_mount_point_for_locally_mounted_remote_share(get_mount_point()): ++ return ++ ++ + source_metadata_dir_path = get_mount_point() + '/.Sugar-Metadata' + + old_fname = os.path.basename(file_path) +@@ -1003,7 +1011,7 @@ def _write_metadata_and_preview_files_and_return_file_paths(metadata, + + # For copying to School-Server, we need to retain this property. + # Else wise, I have no idea why this property is being removed !! +- if (metadata.get('mountpoint', '/') != (WEBDAV_MOUNT_POINT + SCHOOL_SERVER_IP_ADDRESS_OR_DNS_NAME)) and \ ++ if (is_mount_point_for_locally_mounted_remote_share(metadata.get('mountpoint', '/')) == False) and \ + (metadata.get('mountpoint', '/') != LOCAL_SHARES_MOUNT_POINT): + metadata_copy.pop('filesize', None) + +-- +1.7.4.4 + |