Comment 8 for bug 1413821

Revision history for this message
Stefano Verzegnassi (verzegnassi-stefano) wrote :

My two cents on this question, since it affects also ubuntu-docviewer-app.

Docviewer re-uses some classes from gallery-app to handle content-hub import/export[1].
During an MP, it has been suggested to compare the MD5 checksum of the imported document with the checksum of the existing document with the same name.
If they're the same, the app should finalize the transfer without creating a new copy of the file.

It seems easy to achieve this with the C++ APIs, but I don't know how it could work with the QML APIs.

However, I agree with Arto: while I was looking at this issue, I expected that content-hub exposed the source path of a transfered file through some function, since that would simplify a lot the management of such critical scenarios.

[1], line 56: http://bazaar.launchpad.net/~ubuntu-docviewer-dev/ubuntu-docviewer-app/trunk/view/head:/src/app/content-communicator.cpp