D19080: Make file overwrite a bit safer

2020-05-08 Thread David Faure
dfaure added inline comments.

INLINE COMMENTS

> dfaure wrote in jobtest.cpp:1759
> The other problems were fixed, but this test still fails randomly.
> 
> In fact, why are we checking that the dest file already started to be created 
> when totalSize is emitted?
> Surely copying involves looking at the src file first, emitting totalSize, 
> and *then* starting to create the destination, no?
> 
> Maybe it's not totalSize we should connect to, but more of a progress 
> signal

Done in https://commits.kde.org/kio/30d74b814f794e52fa4561181b7b864558144e3a

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D19080

To: chinmoyr, dfaure, ngraham
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D19080: Make file overwrite a bit safer

2020-05-08 Thread David Faure
dfaure added inline comments.

INLINE COMMENTS

> jobtest.cpp:1759
> +Q_UNUSED(totalSize);
> +QCOMPARE(destFileExists,  QFile::exists(destPartFile));
> +});

The other problems were fixed, but this test still fails randomly.

In fact, why are we checking that the dest file already started to be created 
when totalSize is emitted?
Surely copying involves looking at the src file first, emitting totalSize, and 
*then* starting to create the destination, no?

Maybe it's not totalSize we should connect to, but more of a progress signal

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D19080

To: chinmoyr, dfaure, ngraham
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D19080: Make file overwrite a bit safer

2019-03-05 Thread David Faure
dfaure added a comment.


  This test fails in CI, please investigate and fix:
  
  FAIL!  : JobTest::safeOverwrite(dest file exists) Compared values are not the 
same
  
Actual   (spyTotalSize.count()): 0
Expected (1)   : 1
Loc: [/home/jenkins/workspace/Frameworks/kio/kf5-qt5 
SUSEQt5.10/autotests/jobtest.cpp(1765)]
  
  FAIL!  : JobTest::safeOverwrite(dest file doesn't exist) Compared values are 
not the same
  
Actual   (spyTotalSize.count()): 0
Expected (1)   : 1
Loc: [/home/jenkins/workspace/Frameworks/kio/kf5-qt5 
SUSEQt5.10/autotests/jobtest.cpp(1765)]
  
  
https://build.kde.org/view/OS%20-%20Linux/job/Frameworks/job/kio/job/kf5-qt5%20SUSEQt5.10/44/testReport/projectroot/autotests/kiocore_jobtest/

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D19080

To: chinmoyr, dfaure, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D19080: Make file overwrite a bit safer

2019-03-03 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:f34c2cf0abf1: Make file overwrite a bit safer (authored 
by chinmoyr).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19080?vs=53044=53045

REVISION DETAIL
  https://phabricator.kde.org/D19080

AFFECTED FILES
  autotests/jobtest.cpp
  autotests/jobtest.h
  src/ioslaves/file/file_unix.cpp

To: chinmoyr, dfaure, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D19080: Make file overwrite a bit safer

2019-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 53044.
chinmoyr retitled this revision from "[WIP] Make file overwrite a bit safer" to 
"Make file overwrite a bit safer".
chinmoyr edited the summary of this revision.
chinmoyr added a comment.


  Print strerror.

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19080?vs=51939=53044

BRANCH
  arcpatch-D19080 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D19080

AFFECTED FILES
  autotests/jobtest.cpp
  autotests/jobtest.h
  src/ioslaves/file/file_unix.cpp

To: chinmoyr, dfaure, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns