Skip to content

Commit bb17d19

Browse files
committed
remove check if project dir is writeable
1 parent 6343d78 commit bb17d19

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/core/utils/fileutils.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -444,24 +444,6 @@ bool FileUtils::writeFileContent( const QString &filePath, const QByteArray &con
444444
QFileInfo fileInfo( filePath );
445445
QDir directory = fileInfo.dir();
446446

447-
bool isLikelyWritable = false;
448-
449-
#ifdef Q_OS_ANDROID
450-
QString appStorage = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation );
451-
isLikelyWritable = filePath.startsWith( appStorage );
452-
#elif defined( Q_OS_IOS )
453-
QString appStorage = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation );
454-
isLikelyWritable = filePath.startsWith( appStorage );
455-
#else
456-
QFileInfo dirInfo( directory.absolutePath() );
457-
isLikelyWritable = dirInfo.isWritable();
458-
#endif
459-
460-
if ( !isLikelyWritable )
461-
{
462-
qWarning() << QStringLiteral( "Writing to %1 may fail due to platform restrictions. Use PlatformUtilities.applicationDirectory() for a safe location." ).arg( filePath );
463-
}
464-
465447
if ( !directory.exists() )
466448
{
467449
if ( !directory.mkpath( "." ) )

0 commit comments

Comments
 (0)