Bug 1410181
| Summary: | Support drag-n-drop for existing files. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Andrei Stepanov <astepano> |
| Component: | spice-vdagent-win | Assignee: | Victor Toso <victortoso> |
| Status: | CLOSED ERRATA | QA Contact: | SPICE QE bug list <spice-qe-bugs> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | --- | CC: | cfergeau, dblechte, emarcus, jjongsma, lsurette, mtessun, rduda, srevivo, tpelka, uril, victortoso |
| Target Milestone: | rc | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | vdagent-win-4.3-1 mingw-spice-vdagent-0.9.0-5 | Doc Type: | If docs needed, set a value |
| Doc Text: |
In this release, copying a file by drag-and-drop from a client to a Windows guest is now supported even when the copied file name already exists on the Windows guest. The new copy of the file is renamed with a numeral added to the file name.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-06-20 14:46:55 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Spice | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Andrei Stepanov
2017-01-04 16:50:15 UTC
*** Bug 1440129 has been marked as a duplicate of this bug. *** Should be fixed by:
commit 241425b7da80626f0d3bc471202e753f0f1dd178
Author: Frediano Ziglio <fziglio>
Date: Wed Apr 26 15:34:53 2017 -0500
Support file transfer for existing files
Previously, if the user attempted to transfer a file that had the same
name as a file that already exists on the guest, we would just fail the
transfer. This patch tries to match the behavior of the linux vdagent
where we try to append an integer onto the name of the new file to make
it unique. For example, if you tried to transfer 'file.doc' to the guest
and that file already existed, it would try to create 'file (1).doc'
instead. If that also failed, it would attempt 'file (2).doc', etc, up
to 63.
Resolves: rhbz#1410181
Acked-by: Jonathon Jongsma <jjongsma>
Should be already fixed in latest build since 4.1.z
As per comment #2, we can move this to ON_QA to verify the fix on 4.2 This is not fixed for Windows guests. https://bugzilla.redhat.com/show_bug.cgi?id=1410181#c2 mentions fix for linux guest. Tried rhel75 host/client + Win10 guest with vdagent-win-4.1-5 drivers installed. After file transfer (of the file, which already exists on guest's desktop) an error message emerges: 'An error caused the following file transfer to fail: $filename' So moving back.. I've just confirmed that the problem here is not in vdagent's code but in sprintf_s() function or in mingw [0] to be precise. [0] https://sourceforge.net/p/mingw-w64/bugs/525/ The upstream code originaly used sprintf() function as the target buffer has enough space but that seem to cause a crash depending on which Fedora version you were building it with [1] [1] https://lists.freedesktop.org/archives/spice-devel/2017-May/037661.html The issue around sprintf() was not tracked and I couldn't find any reference to a bug upstream. I've tested here with sprintf() and I could not see any issue. I'll have a downstream patch changing from sprintf_s() to sprintf() and check how to get the fix for mingw in RHEL/RHEVM. -- Just for completeness, running: > char buffer[128] = ""; > int value = sprintf_s(buffer, 128, "test"); > vd_printf("%d: '%s'\n", value, buffer); Is going to print "0: ''" instead of "4: 'test'" (In reply to Victor Toso from comment #6) > I've just confirmed that the problem here is not in vdagent's code but in > sprintf_s() function or in mingw [0] to be precise. > > [0] https://sourceforge.net/p/mingw-w64/bugs/525/ > > The upstream code originaly used sprintf() function as the target buffer has > enough space but that seem to cause a crash depending on which Fedora > version you were building it with [1] > > [1] https://lists.freedesktop.org/archives/spice-devel/2017-May/037661.html > > The issue around sprintf() was not tracked and I couldn't find any reference > to a bug upstream. I've tested here with sprintf() and I could not see any > issue. > > I'll have a downstream patch changing from sprintf_s() to sprintf() and > check how to get the fix for mingw in RHEL/RHEVM. It seems the last builds of mingw-crt were done by us (SPICE team, by Fidencio). If I followed the discussion correctly, the patch fixing sprintf_s is https://github.com/mirror/mingw-w64/commit/9975303 and seems easy to backport (though maybe we'll want to rebase mingw-crt instead while at it?) Considering comment #8, moving to 4.3. Should be fixed by rebase on Bug 1615874 I'll move to POST, this should be included in an errata to have the fix documented for customers. This bug has not been marked as blocker for oVirt 4.3.0. Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1. 4.3.1 has been released, please re-target this bug as soon as possible. 4.3.1 has been release a while ago as RHV 4.3 Beta 2, re-targeting to 4.3.3 for re-evaluation Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1555 |