- fix: files in network drive is opened in readonly mode

This commit is contained in:
Roy Qu 2022-08-06 08:51:53 +08:00
parent 8d4411ee55
commit 829e73895b
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
Red Panda C++ Version 1.2
- enhancement: Portuguese Translation ( Thanks for crcpucmg@github)
- fix: files in network drive is opened in readonly mode
Red Panda C++ Version 1.1.6

View File

@ -425,14 +425,15 @@ bool isSystemHeaderFile(const QString &fileName, const QSet<QString> &includePat
if (includePaths.isEmpty())
return false;
bool isFullName = false;
#ifdef Q_OS_WIN
isFullName = fileName.length()>2 && fileName[1]==':';
isFullName = fileName.startsWith("/") || (fileName.length()>2 && fileName[1]==':');
#else
isFullName = fileName.startsWith("/");
#endif
if (isFullName) {
// If it's a full file name, check if its directory is an include path
QFileInfo info(fileName);
// If it's a full file name, check if its directory is an include path
if (info.exists()) { // full file name
QDir dir = info.dir();
QString absPath = includeTrailingPathDelimiter(dir.absolutePath());