Skip to content

Windows XP Client: shortcut file (extension .lnk) has wrong size/corrupted #2792

Closed

Description

@nekoal

Expected behaviour

Shortcut files (extension .lnk) syncronized without checking its contents as others files.
Or
Shortcut files excludes from syncronization.

Actual behaviour

Activity log shows size of object, not size of shortcut file. This cause shortcut to folders has 0 bytes and corrupted on server. Shortcut with cyrillic characters in filename detects as missed/changed on server and syncronized again and again.

Steps to reproduce

  1. Create shortcut for folder/file with standart Windows ways and place in sync folder. Watch size of shortcut.
  2. Wait for syncronization. In activity log watch size of chortcut.
  3. Shortcut with cyrillic characters in filename syncronized again and again.
  4. When downloads folder shortcut from server it has zero size and not exist in desctination folder.
    Shortcut with cyrillic characters in filename normally downloads.

Server configuration

Operating system: Windows XP SP3

Web server: Apache 2.0

Database: MySQL

PHP version: 5.3.5

ownCloud version: 7.0.4

Storage backend: NTFS

Client configuration

Client version: 1.8.0-nigntly20150205

Operating system: Windows XP SP3

OS language: Russian

Installation path of client: D:\Program Files\ownCloud

Logs

  1. Apache error log has no records at this time.
  2. Output of owncloud --logwindow:
  3. ownCloud log (data/owncloud.log):

Folder shortcut:

02-08 04:33:49:746 0x60afb1c csync_ftw: Uniq ID from Database: Trav.lnk -> 54d6460436061
02-08 04:33:49:746 0x60afb1c csync_walker: file: E:\dbases/Trav.lnk [inode=36961 size=388]
02-08 04:33:49:746 0x60afb1c _csync_detect_update: Database entry found, compare: 1382081681 <-> 1382081681, etag: 54d6460436061 <-> 54d6460436061, inode: 36961 <-> 36961, size: 388 <-> 0, perms: <-> RDNVW
02-08 04:33:49:746 0x60afb1c _csync_detect_update: file: Trav.lnk, instruction: INSTRUCTION_NONE <<=

{"reqId":"54d6460437a3b","app":"OC\Files\Cache\Scanner","message":"!!! No reuse of etag for 'files/dbases/Trav.lnk' !!! \ncache: Array\n(\n [fileid] => 67\n [storage] => home::bertix\n [path] => files/dbases/Trav.lnk\n [parent] => 33\n [name] => Trav.lnk\n [mimetype] => application/octet-stream\n [mimepart] => application\n [size] => 0\n [mtime] => 1423328771\n [storage_mtime] => 1423328771\n [encrypted] => \n [unencrypted_size] => 0\n [etag] => 54d64603ea2e7\n [permissions] => 27\n)\n \ndata: Array\n(\n [mimetype] => application/octet-stream\n [mtime] => 1382081681\n [size] => 0\n [etag] => 54d6460436061\n [storage_mtime] => 1382081681\n [permissions] => 27\n [parent] => 33\n)\n","level":0,"time":"2015-02-07T17:06:12+00:00","method":"PUT","url":"/owncloud/remote.php/webdav/dbases/Trav.lnk"}

File shortcut:

02-08 04:33:49:809 0x60afb1c csync_ftw: Uniq ID from Database: - ODBC.lnk -> 54d67682ac06f
02-08 04:33:49:809 0x60afb1c csync_walker: file: E:\dbases/- ODBC.lnk [inode=36988 size=1578]
02-08 04:33:49:809 0x60afb1c _csync_detect_update: Database entry found, compare: 1274707019 <-> 1274707019, etag: 54d67682ac06f <-> 54d67682ac06f, inode: 36988 <-> 36988, size: 1578 <-> 53248, perms: <-> RDNVCK
02-08 04:33:49:809 0x60afb1c _csync_detect_update: file: Источники ODBC.lnk, instruction: INSTRUCTION_EVAL <<=

{"reqId":"54d674a4a26ab","app":"OC\Files\Cache\Scanner","message":"!!! No reuse of etag for 'files/dbases/\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 ODBC.lnk' !!! \ncache: Array\n(\n [fileid] => 364\n [storage] => home::bertix\n [path] => files/dbases/\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 ODBC.lnk\n [parent] => 33\n [name] => \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 ODBC.lnk\n [mimetype] => application/octet-stream\n [mimepart] => application\n [size] => 1578\n [mtime] => 1274707019\n [storage_mtime] => 1274707019\n [encrypted] => \n [unencrypted_size] => 0\n [etag] => 54d674659cc4a\n [permissions] => 27\n)\n \ndata: Array\n(\n [mimetype] => application/octet-stream\n [mtime] => 1423340708\n [size] => 1578\n [etag] => 54d674a4a05f3\n [storage_mtime] => 1423340708\n [permissions] => 27\n [parent] => 33\n)\n","level":0,"time":"2015-02-07T20:25:08+00:00","method":"PUT","url":"/owncloud/remote.php/webdav/dbases/%D0%98%D1%81%D1%82%D0%BE%D1%87%D0%BD%D0%B8%D0%BA%D0%B8%20ODBC.lnk"}

Activity

  1. danimo commented on Feb 7, 2015

    @danimo
    Contributor

    The template has all those fields for a reason :-). We at least need to know the client version.

  2. nekoal commented on Feb 7, 2015

    @nekoal
    Author

    Updated. I know it is not stable version - also localization and shell extention don't work, installer and temporary file present in ownCloud\shellext. But issue #2648 seems fixed.

  3. danimo commented on Feb 8, 2015

    @danimo
    Contributor
  4. danimo commented on Feb 8, 2015

    @danimo
    Contributor

    Temp files are related to the context menu not registering (NSIS then tries twice to register those on startup using said file, then deletes it).

    It seems that the symbols required by regsvr32 do not get exported despite being specified in the .def file. This needs investigation

    //cc @jturcotte

  5. added
    p2-high
    on Feb 8, 2015
  6. added this to the 1.8 - UI Enhancements milestone on Feb 8, 2015
  7. nekoal commented on Feb 8, 2015

    @nekoal
    Author

    I wonder.. When 1.8.0-nigntly20150205 uninstalls it tried unregister x64, but files and OS x86. Also OCOverlays_x86.dll and OCUtil_x86.dll present in shellext after uninstall.
    ownc_del0205_1
    ownc_del0205_2
    regsvr32 /u for this files failed.
    ownc_del0205_3
    1.8.0-nightly20150207 translations works. Shell extension don't. After reboot and reinstall and reregister - same result. Folder shortcuts doubled - first original filename empty file from server, second with '_conflict' in filename. It seems file shortcuts with cyrillic characters ignored. And one with english characters show 'unknown error' in activity.

  8. danimo commented on Feb 9, 2015

    @danimo
    Contributor

    @ogoffart can you take a look at the lnk issue itself? Hypothesis: Qt treats lnk files as links (which we usually do not sync).

  9. ckamm commented on Feb 12, 2015

    @ckamm
    Contributor

    I can reproduce this issue. Csync seems to see the correct file size (about 1k) but later we try to upload my shortcut file in several chunks (progress bar shows 22 mb) and fail with "Unknown error".

  10. assigned and unassigned on Feb 12, 2015
  11. ckamm commented on Feb 12, 2015

    @ckamm
    Contributor

    While the Qt documentation says

    On Windows, symlinks (shortcuts) are .lnk files. The reported size() is that of the symlink (not the link's target)

    QFileInfo::size() on lnk files actually gives the target's size due to https://bugreports.qt.io/browse/QTBUG-24831.

  12. 23 remaining items

  13. ckamm commented on Mar 11, 2015

    @ckamm
    Contributor

    @nekoal Thanks for your test case! I could reproduce and fix the problem. All four conflict combinations work for me now; I'll mark this as readytotest once the patch is merged.

  14. added
    ReadyToTest
    on Mar 11, 2015
  15. dragotin commented on Mar 11, 2015

    @dragotin
    Contributor

    Well, yes, the screenshot does not really indicate an error, because all the entries reference different files. The upload was probably triggered by the DST bug.

  16. nekoal commented on Mar 12, 2015

    @nekoal
    Author

    @ckamm Thank you. Tested 1.8.0.4826-nightly20150311 and 1.8.0.4827-nightly20150312. For all 4 files made conflict files in both directions. Other tests schemes also work for me. I'm out of ideas how to test it more.
    This issue can be closed. As well as #1938 (I can't reproduce it with client builds 4764 and later, so it fixed before 1.8.0-beta2).

    P.S. About empty lines - it's lines when conflict file sucessfully created. It don't bother me much. I'm not sure may be this is bug in translations. I rather worry about seconds not showing in activity log on Windows 7. Previous screenshot was from Windows XP, new screenshot from Windows 7.
    oc_4shortcut_4827

  17. ckamm commented on Mar 12, 2015

    @ckamm
    Contributor

    @nekoal Thanks, that sounds good!

    I'll look at the other issues you mentioned.

  18. removed
    ReadyToTest
    on Mar 12, 2015
  19. nekoal commented on Mar 12, 2015

    @nekoal
    Author

    About seconds. I check Control Panel on both Windows. Windows XP has only one format string for time and 2 strings for date (full and short). Windows 7 has 2 strings for date and 2 strings fo time. It seems client select by default short string for date and short string for time (without seconds). I see some logic but client ignored changing format in Control Panel.

  20. VincentvgNn commented on Apr 16, 2015

    @VincentvgNn

    @nekoal
    The issue of the missing seconds in the client's Sync Activity log has recently been solved since client version 1.8.0.4938-nightly20150411. See issue #2535.
    In the client seconds are added to the Windows short time format.

  21. nekoal commented on Apr 20, 2015

    @nekoal
    Author

    @VincentvgNn Thank you for information. Well, now on my Win 7 computer still 1.8.0.4827 and I think bug with seconds better than bug with deletion of files in 1.8.0.4893. I already test updating on other computer.. When client already show 4893 as possible update then after manual install builds 49xx starts automatic update (or rather rollback) to 4893 which I want to avoid. So I'll test it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions