@@ -195,6 +195,14 @@ PluginFinishType CliInterface::extractFiles(const QList<FileEntry> &files, const
195195 }
196196 }
197197 }
198+
199+ if (bHandleLongName && !checkMoveCapability ()) {
200+ qWarning () << " Long filename detected, but moveProgram (" << m_cliProps->property (" moveProgram" ).toString () << " ) is not available." ;
201+ qWarning () << " Archive format:" << m_mimetype.name () << " Skipping long name handling." ;
202+ qWarning () << " The extraction tool will report errors for files with names exceeding system limit (255 bytes)." ;
203+ bHandleLongName = false ;
204+ }
205+
198206 if (destPath.startsWith (" /tmp" ) && destPath.contains (" /deepin-compressor-" )) { // 打开解压列表文件
199207 if (!QDir (destPath).exists ()) {
200208 QDir (destPath).mkpath (destPath);
@@ -236,6 +244,7 @@ PluginFinishType CliInterface::extractFiles(const QList<FileEntry> &files, const
236244 } else {
237245 password = options.password ;
238246 }
247+
239248 if (!bLnfs) {
240249 for (QMap<QString, FileEntry>::const_iterator iter = arcData.mapFileEntry .begin (); iter != arcData.mapFileEntry .end (); iter++) {
241250 if (NAME_MAX < iter.value ().strFileName .toLocal8Bit ().length ()) {
@@ -244,6 +253,14 @@ PluginFinishType CliInterface::extractFiles(const QList<FileEntry> &files, const
244253 }
245254 }
246255 }
256+
257+ if (bHandleLongName && !checkMoveCapability ()) {
258+ qWarning () << " Long filename detected, but moveProgram (" << m_cliProps->property (" moveProgram" ).toString () << " ) is not available." ;
259+ qWarning () << " Archive format:" << m_mimetype.name () << " Skipping long name handling." ;
260+ qWarning () << " The extraction tool will report errors for files with names exceeding system limit (255 bytes)." ;
261+ bHandleLongName = false ;
262+ }
263+
247264 if (bHandleLongName) {
248265 if (!handleLongNameExtract (arcData.mapFileEntry .values ())) {
249266 m_eErrorType = ET_FileWriteError;
@@ -1098,6 +1115,17 @@ bool CliInterface::moveExtractTempFilesToDest(const QList<FileEntry> &files, con
10981115 return moveSuccess;
10991116}
11001117
1118+ bool CliInterface::checkMoveCapability ()
1119+ {
1120+ bool hasMoveCapability = false ;
1121+ QString moveProgram = m_cliProps->property (" moveProgram" ).toString ();
1122+ if (!moveProgram.isEmpty ()) {
1123+ QString moveProgramPath = QStandardPaths::findExecutable (moveProgram);
1124+ hasMoveCapability = !moveProgramPath.isEmpty ();
1125+ }
1126+ return hasMoveCapability;
1127+ }
1128+
11011129void CliInterface::removeExtractedFilesOnFailure (const QString &strTargetPath, const QList<FileEntry> &entries)
11021130{
11031131 QList<FileEntry> listToRemove = entries;
0 commit comments