Mercurial > hg > minc-tools
changeset 2023:1e1b5cad203f
* removed ':' from temporary filenames for windows compatibility
author | rotor <rotor> |
---|---|
date | Thu, 17 Mar 2005 14:13:47 +0000 |
parents | 391a502c6b29 |
children | 1993bd740588 |
files | ChangeLog volume_io/Prog_utils/files.c |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ MINC 2: +2005-03-17 Andrew Janke <a.janke@gmail.com> + * removed ':' from temporary filenames for windows compatibility + 2005-03-11 Bert Vincent <bert@bic.mni.mcgill.ca> * Improve nii2mnc's support for functional (time-varying) data, and support qform as well as sform transforms in the header.
--- a/volume_io/Prog_utils/files.c +++ b/volume_io/Prog_utils/files.c @@ -22,8 +22,9 @@ #endif /* HAVE_UNISTD_H */ #include <errno.h> + #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/files.c,v 1.40 2004-10-04 20:23:52 bert Exp $"; +static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/files.c,v 1.41 2005-03-17 14:13:47 rotor Exp $"; #endif static BOOLEAN has_no_extension( STRING ); @@ -259,6 +260,7 @@ { int i, len, count; STRING expanded, backup_filename, date; + expanded = expand_filename( filename ); date = get_date(); @@ -296,6 +298,12 @@ if( backup_filename[i] == ' ' || backup_filename[i] == '\t' || backup_filename[i] == '\n' ) backup_filename[i] = '_'; + + /* remove ':' for windows */ + if( backup_filename[i] == ':'){ + backup_filename[i] = '-'; + } + } ++count;