Skip to content

Commit 00f6dae

Browse files
authored
Use absolute tempPath for temporary CSV file
QTemporaryFile(templateName) creates the file in the current working directory if given a relative path. When starting the app in Finder on macOS, the working directory is /, causing temporary file creation to fail.
1 parent 3199377 commit 00f6dae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ void MainWindow::importTableFromCSV()
14391439
} else if(sender() == ui->actionFileImportCsvClipboard) {
14401440
// Save clipboard content to temporary file
14411441

1442-
QTemporaryFile temp("csv_clipboard");
1442+
QTemporaryFile temp(QDir::tempPath() + QDir::separator() + "csv_clipboard");
14431443
temp.open();
14441444
QClipboard* clipboard = QGuiApplication::clipboard();
14451445
temp.write(clipboard->text().toUtf8());

0 commit comments

Comments
 (0)