Fix occurrences of wrong encoding handling with `std::filesystem`
This commit is contained in:
parent
7ba63ad79f
commit
7f1e234f36
|
@ -874,7 +874,7 @@ void setTagInfo(const SetTagInfoArgs &args)
|
|||
auto modifiedFilePath = std::filesystem::path();
|
||||
fileInfo.setSaveFilePath(currentOutputFile != noMoreOutputFiles ? string(*currentOutputFile) : string());
|
||||
if (args.preserveModificationTimeArg.isPresent()) {
|
||||
modifiedFilePath = fileInfo.saveFilePath().empty() ? fileInfo.path() : fileInfo.saveFilePath();
|
||||
modifiedFilePath = std::filesystem::u8path(fileInfo.saveFilePath().empty() ? fileInfo.path() : fileInfo.saveFilePath());
|
||||
modificationDate = std::filesystem::last_write_time(modifiedFilePath, modificationDateError);
|
||||
}
|
||||
try {
|
||||
|
|
|
@ -1187,7 +1187,7 @@ bool TagEditorWidget::startSaving()
|
|||
auto modificationDate = std::filesystem::file_time_type();
|
||||
auto modifiedFilePath = std::filesystem::path();
|
||||
if (preserveModificationTime) {
|
||||
modifiedFilePath = m_fileInfo.saveFilePath().empty() ? m_fileInfo.path() : m_fileInfo.saveFilePath();
|
||||
modifiedFilePath = std::filesystem::u8path(m_fileInfo.saveFilePath().empty() ? m_fileInfo.path() : m_fileInfo.saveFilePath());
|
||||
modificationDate = std::filesystem::last_write_time(modifiedFilePath, modificationDateError);
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue