@@ -201,6 +201,14 @@ PluginFinishType CliInterface::extractFiles(const QList<FileEntry> &files, const
201201 }
202202 }
203203 }
204+
205+ if (bHandleLongName && !checkMoveCapability ()) {
206+ qWarning () << " Long filename detected, but moveProgram (" << m_cliProps->property (" moveProgram" ).toString () << " ) is not available." ;
207+ qWarning () << " Archive format:" << m_mimetype.name () << " Skipping long name handling." ;
208+ qWarning () << " The extraction tool will report errors for files with names exceeding system limit (255 bytes)." ;
209+ bHandleLongName = false ;
210+ }
211+
204212 if (destPath.startsWith (" /tmp" ) && destPath.contains (" /deepin-compressor-" )) { // 打开解压列表文件
205213 if (!QDir (destPath).exists ()) {
206214 QDir (destPath).mkpath (destPath);
@@ -242,6 +250,7 @@ PluginFinishType CliInterface::extractFiles(const QList<FileEntry> &files, const
242250 } else {
243251 password = options.password ;
244252 }
253+
245254 if (!bLnfs) {
246255 for (QMap<QString, FileEntry>::const_iterator iter = arcData.mapFileEntry .begin (); iter != arcData.mapFileEntry .end (); iter++) {
247256 if (NAME_MAX < iter.value ().strFileName .toLocal8Bit ().length ()) {
@@ -250,6 +259,14 @@ PluginFinishType CliInterface::extractFiles(const QList<FileEntry> &files, const
250259 }
251260 }
252261 }
262+
263+ if (bHandleLongName && !checkMoveCapability ()) {
264+ qWarning () << " Long filename detected, but moveProgram (" << m_cliProps->property (" moveProgram" ).toString () << " ) is not available." ;
265+ qWarning () << " Archive format:" << m_mimetype.name () << " Skipping long name handling." ;
266+ qWarning () << " The extraction tool will report errors for files with names exceeding system limit (255 bytes)." ;
267+ bHandleLongName = false ;
268+ }
269+
253270 if (bHandleLongName) {
254271 if (!handleLongNameExtract (arcData.mapFileEntry .values ())) {
255272 m_eErrorType = ET_FileWriteError;
@@ -1110,6 +1127,17 @@ bool CliInterface::moveExtractTempFilesToDest(const QList<FileEntry> &files, con
11101127 return moveSuccess;
11111128}
11121129
1130+ bool CliInterface::checkMoveCapability ()
1131+ {
1132+ bool hasMoveCapability = false ;
1133+ QString moveProgram = m_cliProps->property (" moveProgram" ).toString ();
1134+ if (!moveProgram.isEmpty ()) {
1135+ QString moveProgramPath = QStandardPaths::findExecutable (moveProgram);
1136+ hasMoveCapability = !moveProgramPath.isEmpty ();
1137+ }
1138+ return hasMoveCapability;
1139+ }
1140+
11131141void CliInterface::removeExtractedFilesOnFailure (const QString &strTargetPath, const QList<FileEntry> &entries)
11141142{
11151143 QList<FileEntry> listToRemove = entries;
0 commit comments