From 225b1cb38b4086fe764618766507d44799316f36 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 9 Jul 2011 04:01:30 +0200 Subject: fixed file backups for HAVE_LONG_FILE_NAMES * now files can be saved, but the current heuristics of creating a .OLD once and afterwards updating a .BAK might be nonsense * behaviour without HAVE_LONG_FILE_NAMES should work but does not make sense IMHO: will remove support for that case anyways --- teccmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teccmd.c b/teccmd.c index 81a909c..58d8628 100644 --- a/teccmd.c +++ b/teccmd.c @@ -1104,7 +1104,7 @@ int status; #ifdef HAVE_LONG_FILE_NAMES (void) strcpy(tmp_filename,base_filename); (void) strcat(tmp_filename,".OLD"); - status = cmd_writebak(fi,filename,path_name,tmp_filename,O_EXCL); + status = cmd_writebak(fi,path_name,filename,tmp_filename,O_EXCL); #else (void) strcpy(tmp_filename,path_name); (void) strcat(tmp_filename,".TECOLD"); @@ -1125,7 +1125,7 @@ int status; #ifdef HAVE_LONG_FILE_NAMES (void) strcpy(tmp_filename,base_filename); (void) strcat(tmp_filename,".BAK"); - status = cmd_writebak(fi,filename,path_name,tmp_filename,0); + status = cmd_writebak(fi,path_name,filename,tmp_filename,0); #else (void) strcpy(tmp_filename,path_name); (void) strcat(tmp_filename,".TECBAK"); -- cgit v1.2.3