mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Remove misc::chmod644() function
This commit is contained in:
parent
737982e92f
commit
ed468083c5
3 changed files with 0 additions and 20 deletions
14
src/misc.cpp
14
src/misc.cpp
|
@ -488,20 +488,6 @@ bool misc::sameFiles(const QString &path1, const QString &path2) {
|
||||||
return same;
|
return same;
|
||||||
}
|
}
|
||||||
|
|
||||||
void misc::chmod644(const QDir& folder) {
|
|
||||||
qDebug("chmod644(%s)", qPrintable(folder.absolutePath()));
|
|
||||||
if(!folder.exists()) return;
|
|
||||||
foreach(const QFileInfo &fi, folder.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoSymLinks)) {
|
|
||||||
if(fi.fileName().startsWith(".")) continue;
|
|
||||||
if(fi.isDir()) {
|
|
||||||
misc::chmod644(QDir(fi.absoluteFilePath()));
|
|
||||||
} else {
|
|
||||||
QFile f(fi.absoluteFilePath());
|
|
||||||
f.setPermissions(f.permissions()|QFile::ReadUser|QFile::WriteUser|QFile::ReadGroup|QFile::ReadOther);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QString misc::updateLabelInSavePath(QString defaultSavePath, QString save_path, const QString &old_label, const QString &new_label) {
|
QString misc::updateLabelInSavePath(QString defaultSavePath, QString save_path, const QString &old_label, const QString &new_label) {
|
||||||
if(old_label == new_label) return save_path;
|
if(old_label == new_label) return save_path;
|
||||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||||
|
|
|
@ -78,8 +78,6 @@ public:
|
||||||
return QString(out);
|
return QString(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void chmod644(const QDir& folder);
|
|
||||||
|
|
||||||
static inline QString file_extension(const QString &filename) {
|
static inline QString file_extension(const QString &filename) {
|
||||||
QString extension;
|
QString extension;
|
||||||
int point_index = filename.lastIndexOf(".");
|
int point_index = filename.lastIndexOf(".");
|
||||||
|
|
|
@ -575,10 +575,6 @@ void SearchEngine::updateNova() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef Q_WS_WIN
|
|
||||||
// Fix permissions
|
|
||||||
misc::chmod644(QDir(misc::searchEngineLocation()));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Slot called when search is Finished
|
// Slot called when search is Finished
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue