Download it now!
Bug 44994 - write out tools' FileCopier class ...
Summary: write out tools' FileCopier class ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: Other All
: medium normal
Assignee: Andras Timar
URL:
Whiteboard: target:4.1.0
Keywords: difficultyInteresting, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2012-01-20 07:17 UTC by Michael Meeks
Modified: 2015-12-16 00:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2012-01-20 07:17:39 UTC
The implementation of the FileCopier causes problems with sal - needing the system file-handler to be exposed for various statting methods.

It is unclear that we really need the FileCopier class either - it looks like it is used only internally to the tools/ code and in only one place: DirEntry::CopyTo.

And then only if:
        FSYS_ACTION_COPYFILE == (nActions & FSYS_ACTION_COPYFILE)

And then only on Unix ;-) we should audit to ensure that all CopyTo's only use FSYS_ACTION_COPYFILE - the best way is prolly to drop the nActions flag completely, and then do a full re-compile to catch all the call sites.

We should also check and remove this lot:

#define FSYS_ACTION_RECURSIVE       0x02    // deep through dircetory structure
#define FSYS_ACTION_USERECYCLEBIN   0x04    // move to recycle bin
#define FSYS_ACTION_MOVE            0x08    // delete after copy (=> move)
#define FSYS_ACTION_CONTINUE        0x10    // continue on error
#define FSYS_ACTION_KEEP_EXISTING   0x20    // do not overwrite objects in

From the header, and any code paths that go with them too.

It'd be great to drop that big block of cruft :-)
Comment 1 Florian Reisinger 2012-05-18 09:14:54 UTC
Deteted "Easyhack" from summary
Comment 2 Commit Notification 2013-04-04 18:34:10 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c8f8f36027656e42707d782655187fce3229e0f3

fdo#44994 write out tools' FileCopier class



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Robinson Tryon (qubit) 2015-12-16 00:30:40 UTC
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyInteresting,SkillCpp,TopicCleanup )
[NinjaEdit]