https://bugs.kde.org/show_bug.cgi?id=419373

--- Comment #1 from Toni Asensi Esteve <toni.ase...@kdemail.net> ---
The problem is possibly related to the `KIO::symlink` lines in
synchronizer.cpp, and we have to take into account that it doesn't mean that
`KIO::symlink` is flawed. I attach a little KIO example that uses
`KIO::symlink` but its execution doesn't show the effects of the bug:

Note: The example was based on a program named "tutorial1", from
    https://techbase.kde.org/Development/Tutorials/First_program/KF5
    https://techbase.kde.org/Development/Tutorials/Saving_and_loading/KF5

main.cpp:
    #include <QApplication>
    #include <KMessageBox>
    #include <KIO/Job>

    int main (int argc, char *argv[])
    {
        QApplication app(argc, argv);

        KIO::symlink("/tmp/tryOriginal.txt", QUrl("file:///tmp/tryLink.txt"),
KIO::Overwrite);    

        KMessageBox::information(NULL, "Press Enter to continue", "Dialog");
    }

CMakeLists.txt:
    project (tutorial1)

    cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
    set(QT_MIN_VERSION "5.3.0")
    set(KF5_MIN_VERSION "5.2.0")

    find_package(ECM 1.0.0 REQUIRED NO_MODULE)
    set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cmake)

    include(KDEInstallDirs)
    include(KDECMakeSettings)
    include(KDECompilerSettings)
    include(FeatureSummary)

    # Find Qt modules
    find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS 
        Core    # QCommandLineParser, QStringLiteral
        Widgets # QApplication 
    )

    # Find KDE modules
    find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
        CoreAddons      
        WidgetsAddons   # KMessageBox
        KIO             # KIO
    )

    feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES
FATAL_ON_MISSING_REQUIRED_PACKAGES)

    set(tutorial1_SRCS main.cpp)

    add_executable(tutorial1 ${tutorial1_SRCS})

    target_link_libraries(tutorial1
        Qt5::Widgets
        KF5::CoreAddons
        KF5::WidgetsAddons
        KF5::KIOCore
    )

    install(TARGETS tutorial1  ${INSTALL_TARGETS_DEFAULT_ARGS})

Those steps were followed:
    $ mkdir build && cd build
    $ rm /tmp/tryOriginal.txt /tmp/tryLink.txt 2>/dev/null; touch --date
"2011-11-11 11:11:11 +0100" /tmp/tryOriginal.txt && cmake .. && make &&
./tutorial1; ls -l /tmp/tr*
    [...]
    lrwxrwxrwx 1 user user 20 mar 12 12:36 /tmp/tryLink.txt ->
/tmp/tryOriginal.txt
    -rw-rw-r-- 1 user user  0 nov 11  2011 /tmp/tryOriginal.txt
and so it could be seen that the date of /tmp/tryOriginal.txt hadn't changed,
`KIO::symlink` worked correctly.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to