Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use correct function to get absolute path
use correct function to calculate relative path with respect to rootdir
  • Loading branch information
sunderme committed Sep 25, 2024
1 parent 7d2feef commit 04bdbca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/texstudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5350,7 +5350,8 @@ void Texstudio::insertFromExplorer(bool )
auto index=fileView->currentIndex();
QFileInfo fi = fileExplorerModel->fileInfo(index);
const QString rootDir=fileExplorerModel->rootPath();
const QString fn=getRelativeFileName(fi.absolutePath(),rootDir);
const QString full_fn=fi.canonicalFilePath();
const QString fn=getRelativeBaseNameToPath(full_fn,rootDir,false,true);
insertText(fn);
}

Expand Down

0 comments on commit 04bdbca

Please sign in to comment.