MCPcopy Create free account
hub / github.com/QNapi/qnapi / fixFilePermissions

Method fixFilePermissions

libqnapi/src/subtitlematcher.cpp:126–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void SubtitleMatcher::fixFilePermissions(QString targetSubtitlesFilePath,
127 QString changePermissionsTo) const {
128 bool validPermissions;
129 int permInt = changePermissionsTo.toInt(&validPermissions, 8);
130
131 if (validPermissions) {
132 int perm = 0;
133 perm |= (permInt & 0700) << 2;
134 perm |= (permInt & 0070) << 1;
135 perm |= (permInt & 0007);
136 QFile::setPermissions(targetSubtitlesFilePath, QFile::Permissions(perm));
137 }
138}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected