https://bugs.kde.org/show_bug.cgi?id=524389
Bug ID: 524389
Summary: Error when saving empty file
Classification: Applications
Product: KBibTeX
Version First 0.10
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Loading/saving files
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
DESCRIPTION
When the user attempts to save an empty .bib file (one with 0 elements),
KBibTeX displays an error message and (if applicable) fails to update the name
of the file in the Open Files tab. However, it does write the 0-length .bib
file with the correct filename.
STEPS TO REPRODUCE
1. Start kbibtex from a terminal.
2. In the kbibtex window, click New.
3. A new entry appears in the Open Files tab, Unnamed-1. Click Save As.
4. In the Save File window, enter "test" and click Save.
5. A BibTex File Settings dialog appears; leave the default values selected and
click OK.
OBSERVED RESULT
A window appears displaying an error message:
> Saving the bibliography file to 'file:///home/user/test.bib' failed.
After clicking OK, another window appears displaying an error message:
> The document could not be saved, as it was not possible to write to
> 'file:///home/user/test.bib'.
> Check that you have write access to this file or that enough disk space is
> available.
The entry in the Open Files tab is not renamed to the name entered in the Save
As dialog.
However, the 0-length file test.bib is successfully written to disk.
EXPECTED RESULT
No error message appears, the name of the entry in the Open Files tab is
updated, and the 0-length file is written to disk.
SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.18
KDE Plasma Version: 6.6.6
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
ADDITIONAL INFORMATION
Package version for app-text/kbibtex is 0.10.50_pre20260606.
After step 4, terminal prints 1 line:
> kbibtex.part: Not removing "" from fileSystemWatcher".
After step 5, terminal prints 2 lines:
> kbibtex.io: outputString.length() is 0
> kbibtex.part: Could not write bibliographic data to file.
Note that saving works fine if the file has at least 1 element. Conversely, if
you have an existing file and delete all of its elements, attempting to save
does produce the error messages.
--
You are receiving this mail because:
You are watching all bug changes.