Changeset 106467 in vbox for trunk/src/VBox
- Timestamp:
- Oct 18, 2024 7:15:30 AM (5 months ago)
- svn:sync-xref-src-repo-rev:
- 165293
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r106458 r106467 422 422 } 423 423 424 /* static */ 425 QString UIVisoContentBrowser::sanitizePath(const QString &strOriginal) 426 { 427 /* Look for white space and double quote: */ 428 QRegularExpression regex("[\\s\"]"); 429 if (!regex.match(strOriginal).hasMatch()) 430 return strOriginal; 431 QString strNew(strOriginal); 432 strNew.replace("\"", "\\\""); 433 strNew.append("\""); 434 strNew.prepend("\""); 435 return strNew; 436 } 437 424 438 QStringList UIVisoContentBrowser::entryList() 425 439 { … … 429 443 if (iterator.value().isEmpty()) 430 444 continue; 431 QString strEntry = QString("%1=%2").arg( iterator.key()).arg(iterator.value());445 QString strEntry = QString("%1=%2").arg(sanitizePath(iterator.key())).arg(sanitizePath(iterator.value())); 432 446 entryList << strEntry; 433 447 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h
r106061 r106467 89 89 90 90 void setSortCaseSensitive(bool fCaseSensitive); 91 static QString sanitizePath(const QString &strOriginal); 91 92 92 93 public slots: … … 157 158 void createLoadedFileEntries(const QMap<QString, QString> &fileEntries); 158 159 /* Processes a list of VISO paths that are loaded from a file and indicate file object to be removed from VISO content. */ 159 void processRemovedEntries(const QStringList &removedEntries); 160 void markRemovedUnremovedItemParents(UIFileSystemItem *pItem, bool fRemoved); 161 void enableDisableSelectionDependentActions(); 162 void updateNavigationWidgetPath(const QString &strPath); 163 void setFileTableLabelText(const QString &strText); 164 void enableForwardBackwardActions(); 160 void processRemovedEntries(const QStringList &removedEntries); 161 void markRemovedUnremovedItemParents(UIFileSystemItem *pItem, bool fRemoved); 162 void enableDisableSelectionDependentActions(); 163 void updateNavigationWidgetPath(const QString &strPath); 164 void setFileTableLabelText(const QString &strText); 165 void enableForwardBackwardActions(); 166 165 167 UIVisoContentTableView *m_pTableView; 166 168 UIFileSystemModel *m_pModel; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r106458 r106467 985 985 QTextStream stream(&file); 986 986 stream << QString("%1 %2").arg("--iprt-iso-maker-file-marker-bourne-sh").arg(QUuid::createUuid().toString()) << "\n"; 987 stream<< "--volume-id=" << strVisoName<< "\n";987 stream<< "--volume-id=" << UIVisoContentBrowser::sanitizePath(strVisoName) << "\n"; 988 988 if (!strImportedISOPath.isEmpty()) 989 989 stream << "--import-iso=" << strImportedISOPath << "\n";
Note:
See TracChangeset
for help on using the changeset viewer.