• Stephan Bergmann's avatar
    rhbz#1667364 Open doc as R/O for which open(...,O_RDWR) returns EOPNOTSUPP · bcb1969f
    Stephan Bergmann yazdı
    Map that EOPNOTSUPP to osl_File_E_NOSYS (and intercept it in
    StillReadWriteInteraction, as used by MediaDescriptor::impl_openStreamWithURL in
    unotools/source/misc/mediadescriptor.cxx, which will retry opening it read-only
    then), instead of to osl_File_E_invalidError (which lead to the "General
    input/output error" box).
    
    Instead of "silently" opening the doc as read-only, this still pops up a box
    claiming that the doc is locked by somebody else, asking whether to open it
    read-only or to open a copy.  That's probably because of the
    
      rDescriptor.erase( utl::MediaDescriptor::PROP_READONLY() );
    
    in TypeDetection::impl_openStream (filter/source/config/cache/typedetection.cxx)
    where the comment already hints at the confusion among the different read-only
    and locking concepts.  Changing that looks like it would easily cause
    regressions, so is left for a follow-up commit.  (And ultimately LO wouldn't
    need to treat the doc as read-only at all; it would just need to not attempt to
    open it O_RDWR upfront, and save it via copy+rename, like other apps appear to
    commonly do.)
    
    Change-Id: I56e18f1864084ba222acaf0e38a604082edaf4c6
    Reviewed-on: https://gerrit.libreoffice.org/66805
    Tested-by: Jenkins
    Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    bcb1969f
Adı
Son kayıt (commit)
Son güncelleme
..
qa Loading commit data...
source Loading commit data...
test/com/sun/star/comp/ucb Loading commit data...
CppunitTest_ucb_webdav_local_neon.mk Loading commit data...
CppunitTest_ucb_webdav_neon_opts.mk Loading commit data...
CppunitTest_ucb_webdav_propfindcache.mk Loading commit data...
CppunitTest_ucb_webdav_res_access.mk Loading commit data...
JunitTest_ucb_complex.mk Loading commit data...
JunitTest_ucb_unoapi.mk Loading commit data...
Library_cached1.mk Loading commit data...
Library_srtrs1.mk Loading commit data...
Library_ucb1.mk Loading commit data...
Library_ucpcmis1.mk Loading commit data...
Library_ucpdav1.mk Loading commit data...
Library_ucpexpand1.mk Loading commit data...
Library_ucpext.mk Loading commit data...
Library_ucpfile1.mk Loading commit data...
Library_ucpftp1.mk Loading commit data...
Library_ucpgio1.mk Loading commit data...
Library_ucphier1.mk Loading commit data...
Library_ucpimage.mk Loading commit data...
Library_ucppkg1.mk Loading commit data...
Library_ucptdoc1.mk Loading commit data...
Makefile Loading commit data...
Module_ucb.mk Loading commit data...
README Loading commit data...