Invalid file name/path when exporting txs or backing up wallet on Windows #128

Closed
opened 1 year ago by fekt · 6 comments
fekt commented 1 year ago
Collaborator

This may be a Windows only bug in SD and SDX. I noticed it when exporting transactions from File > Export transactions. User reported the same when File > Backup wallet.dat

It seems to be creating a file name with a path and the "/" is invalid in the name. The file name should only be output once and path is not needed.

This may be a Windows only bug in SD and SDX. I noticed it when exporting transactions from `File > Export transactions`. User reported the same when` File > Backup wallet.dat` It seems to be creating a file name with a path and the "/" is invalid in the name. The file name should only be output once and path is not needed. ![](https://git.hush.is/attachments/87b9dc51-9da0-42a1-8b98-070e3b7ddcf3)
fekt added the
bug
label 1 year ago
duke commented 1 year ago
Owner

This is a very old windows-specific bug, not sure what is going on:

https://github.com/MyHush/SilentDragon/issues/35

This is a very old windows-specific bug, not sure what is going on: https://github.com/MyHush/SilentDragon/issues/35
fekt commented 1 year ago
Poster
Collaborator

Looks like getSaveFileURL is being called incorrectly:
https://doc.qt.io/qt-5/qfiledialog.html#getSaveFileUrl

QString exportName = "hush-transactions-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".csv";

QUrl csvName = QFileDialog::getSaveFileUrl(this,
        tr("Export transactions"), exportName, "CSV file (*.csv)");

Should be able to fix similar to this:
https://stackoverflow.com/questions/60469292/qt-getsavefileurl-method-duplicating-default-file-name

I'll test when I can unless someone else gets to it first.

Looks like getSaveFileURL is being called incorrectly: https://doc.qt.io/qt-5/qfiledialog.html#getSaveFileUrl ``` QString exportName = "hush-transactions-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".csv"; QUrl csvName = QFileDialog::getSaveFileUrl(this, tr("Export transactions"), exportName, "CSV file (*.csv)"); ``` Should be able to fix similar to this: https://stackoverflow.com/questions/60469292/qt-getsavefileurl-method-duplicating-default-file-name I'll test when I can unless someone else gets to it first.
fekt commented 1 year ago
Poster
Collaborator

Fixed now in dev branch and added support for dragonx file names.

Fixed now in dev branch and added support for dragonx file names. ![](https://git.hush.is/hush/SilentDragon/issues/128/attachments/c07f4637-6faf-4eb8-8101-f0eb126257cb)
duke commented 1 year ago
Owner

@fekt have you tested this on Linux ? The weird thing about this bug is that it worked on Linux + Mac, iirc

@fekt have you tested this on Linux ? The weird thing about this bug is that it worked on Linux + Mac, iirc
fekt commented 1 year ago
Poster
Collaborator

@duke I tested on Mac and it was working there. Mac wasn't displaying any file name at all and made you type it in though. Does the filename show on Linux?

@duke I tested on Mac and it was working there. Mac wasn't displaying any file name at all and made you type it in though. Does the filename show on Linux?
duke commented 1 year ago
Owner

@fekt looks good on Linux

@fekt looks good on Linux
duke closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.