[已修正]文件管理器分支develop2.0文件夹剪切变复制错误
Tofloor
poster avatar
134******40
deepin
2017-08-01 01:47
Author
本帖最后由 jdocker 于 2017-8-5 18:35 编辑

用户反馈,在最新版本的1.5内测版中存在在同一磁盘剪切文件夹很慢的问题(如同复制一般)。
https://bbs.deepin.org/module
跟踪dde-file-manager项目源码开发分支develop2.0中发现,4天前有一个提交。改变了这一部分的代码逻辑。
提交前的代码如下:
  1. else if (m_jobType == Move){
  2.     if(m_isInSameDisk)
  3.     {
  4.         if (!moveDir(srcPath, tarDirPath, &targetPath)) {
  5.             if(copyDir(srcPath, tarDirPath, true, &targetPath))
  6.                 deleteDir(srcPath);
Copy the Code


提交后的代码如下:
  1. else if (m_jobType == Move){
  2.     if(m_isInSameDisk)
  3.     {
  4.         if(copyDir(srcPath, tarDirPath, true, &targetPath))
  5.             deleteDir(srcPath);
  6.         }
Copy the Code
提交后的代码少了if (!moveDir(srcPath, tarDirPath, &targetPath)) 这个过程,而这恰恰就是问题的所在,原始代码当移动的文件夹在同一磁盘时,尝试使用moveDir移动文件夹,而只有移动文件夹失败后,才尝试使用copyDir复制文件夹,而新版本直接就复制文件夹,这会导致即使在同一磁盘下也会带来磁盘剪切速度给复制一个样的效果,本来瞬间完成的剪切工作变成了复制过程。不知道修改此处是出于什么考虑(本人完全不熟悉c++,今天看到了,稍微跟踪了一下,具体改回去还需要开发人员)。 https://bbs.deepin.org/user/48640
具体修改的历史记录如下:
https://github.com/linuxdeepin/d ... ed486b400582d94b548
标记:目前该错误已经修正。


Reply Favorite View the author
All Replies
2 / 2
To page
avatar
la******ng@outlook.com
deepin
2017-08-09 20:02
#21
本帖最后由 s9209122222 于 2017-8-9 12:05 编辑

https://bbs.deepin.org/user/76809 请问您那边已经收到更新了吗?
我的 Arch 这边问题还是存在,依旧是复制的,也没收到新的更新


名稱                   : deepin-file-manager
版本                   : 1:4.2.2-3
描述                   : Deepin File Manager
硬體架構               : x86_64
URL                    : https://github.com/linuxdeepin/dde-file-manager
軟體授權               : GPL3
群組                   : deepin
它提供                 : deepin-desktop
它依賴                 : deepin-tool-kit  gtk2  gsettings-qt  libsecret  qt5-svg  file  avfs  polkit-qt5
                         deepin-shortcut-viewer  poppler  ffmpegthumbnailer  deepin-manual  file-roller
                         deepin-qt-dbus-factory  treefrog-framework  deepin-terminal  gst-plugins-good
                         mpv
可選依賴               : 無
需要它                 : 無
為這些軟體包的可選依賴 : 無
與它衝突               : deepin-desktop
它會取代               : deepin-desktop
安裝後大小             : 10.08 MiB
打包者                 : Felix Yan <https://bbs.deepin.org/module>
建置日期               : 西元2017年08月05日 (週六) 00時01分27秒
安裝日期               : 西元2017年08月05日 (週六) 21時11分23秒
安裝原因               : 單獨指定安裝
安裝指令稿             : 否
驗證者                 : 簽章

Reply View the author
avatar
134******40
deepin
2017-08-09 21:42
#22
https://bbs.deepin.org/post/143528
@jdocker 请问您那边已经收到更新了吗?
我的 Arch 这边问题还是存在,依旧是复制的,也没收到新的更新

没有收到更新。
Reply View the author
2 / 2
To page