Use file basename in -c urclock metadata under WIN32
This commit is contained in:
parent
53de22cb83
commit
c0e4dd494e
|
@ -542,8 +542,13 @@ static void set_date_filename(const PROGRAMMER *pgm, const char *fname) {
|
||||||
else {
|
else {
|
||||||
ur.filename[0] = 0;
|
ur.filename[0] = 0;
|
||||||
if(fname && *fname) {
|
if(fname && *fname) {
|
||||||
|
#if !defined (WIN32)
|
||||||
if((base=strrchr(fname, '/')))
|
if((base=strrchr(fname, '/')))
|
||||||
base++;
|
base++;
|
||||||
|
#else
|
||||||
|
if((base=strrchr(fname, '\\')))
|
||||||
|
base++;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
base = fname;
|
base = fname;
|
||||||
strncpy(ur.filename, base, sizeof ur.filename-1);
|
strncpy(ur.filename, base, sizeof ur.filename-1);
|
||||||
|
|
Loading…
Reference in New Issue