mirror of https://gitee.com/openkylin/peony.git
fix-161508,r盘二级以上目录不支持追加操作
This commit is contained in:
parent
2405cb6479
commit
1cc2d67ed6
|
@ -707,8 +707,16 @@ void FileCopyOperation::run()
|
|||
std::shared_ptr<FileOperationHelper> mHelper = std::make_shared<FileOperationHelper>(m_dest_dir_uri);
|
||||
if (mHelper->isUnixCDDevice()) {
|
||||
m_is_udf_burn_work = true;
|
||||
bool isMountpoint = false;
|
||||
mHelper->judgeSpecialDiscOperation();
|
||||
if (!mHelper->dealDVDReduce().isEmpty()) {
|
||||
g_autoptr(GFile) file = g_file_new_for_uri (m_dest_dir_uri.toUtf8().constData());
|
||||
if (file) {
|
||||
g_autoptr(GFileInfo) fileInfo = g_file_query_info(file, G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, nullptr, nullptr);
|
||||
if (fileInfo) {
|
||||
isMountpoint = g_file_info_get_attribute_boolean(fileInfo, G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
|
||||
}
|
||||
}
|
||||
if (!mHelper->dealDVDReduce().isEmpty() && isMountpoint) {
|
||||
m_dest_dir_uri = mHelper->dealDVDReduce();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1222,8 +1222,16 @@ void FileMoveOperation::run()
|
|||
std::shared_ptr<FileOperationHelper> mHelper = std::make_shared<FileOperationHelper>(m_dest_dir_uri);
|
||||
if (mHelper->isUnixCDDevice()) {
|
||||
m_is_udf_burn_work = true;
|
||||
bool isMountpoint = false;
|
||||
mHelper->judgeSpecialDiscOperation();
|
||||
if (!mHelper->dealDVDReduce().isEmpty()) {
|
||||
g_autoptr(GFile) file = g_file_new_for_uri (m_dest_dir_uri.toUtf8().constData());
|
||||
if (file) {
|
||||
g_autoptr(GFileInfo) fileInfo = g_file_query_info(file, G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, nullptr, nullptr);
|
||||
if (fileInfo) {
|
||||
isMountpoint = g_file_info_get_attribute_boolean(fileInfo, G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
|
||||
}
|
||||
}
|
||||
if (!mHelper->dealDVDReduce().isEmpty() && isMountpoint) {
|
||||
m_dest_dir_uri = mHelper->dealDVDReduce();
|
||||
if (isCancelled())
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue