Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#37543 - [mg] File name is clobbered when saving files

Attached to Project: Community Packages
Opened by Philip Dexter (pdexter) - Tuesday, 29 October 2013, 18:05 GMT
Last edited by Sergej Pupykin (sergej) - Wednesday, 30 October 2013, 11:21 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Need to use xdirname instead of dirname when saving the file. Dirname will clobber the filename.

From the code:

```
/*
* dirname using strlcpy semantic.
* Like dirname() except an empty string is returned in
* place of "/". This means we can always add a trailing
* slash and be correct.
* Address portability issues by copying argument
* before using. Some implementations modify the input string.
*/
size_t
xdirname(char *dp, const char *path, size_t dplen)
```


Steps to reproduce:
Try to save any file


See my port here for the one line fix:
https://github.com/philipdexter/mg/blob/master/file.c#L674
This task depends upon

Closed by  Sergej Pupykin (sergej)
Wednesday, 30 October 2013, 11:21 GMT
Reason for closing:  Fixed

Loading...