From: Curt M. <we...@us...> - 2003-06-21 02:07:45
|
Update of /cvsroot/xastir/xastir/src In directory sc8-pr-cvs1:/tmp/cvs-serv6544 Modified Files: main.c Log Message: More moving save station trail and GPSMAN functions to use the local users' ~/.xastir/gps and ~/.xastir/tracklogs directories. Index: main.c =================================================================== RCS file: /cvsroot/xastir/xastir/src/main.c,v retrieving revision 1.299 retrieving revision 1.300 diff -C2 -d -r1.299 -r1.300 *** main.c 20 Jun 2003 23:55:58 -0000 1.299 --- main.c 21 Jun 2003 02:06:40 -0000 1.300 *************** *** 9320,9327 **** xastir_snprintf(temp, sizeof(temp), ! "mv %s/GPS/%s %s/GPS/%s", ! get_data_base_dir("maps"), gps_temp_map_filename, ! get_data_base_dir("maps"), gps_map_filename); --- 9320,9327 ---- xastir_snprintf(temp, sizeof(temp), ! "mv %s/%s %s/%s", ! get_user_base_dir("gps"), gps_temp_map_filename, ! get_user_base_dir("gps"), gps_map_filename); *************** *** 9337,9344 **** xastir_snprintf(temp, sizeof(temp), ! "mv %s/GPS/%s.shx %s/GPS/%s.shx", ! get_data_base_dir("maps"), gps_temp_map_filename_base, ! get_data_base_dir("maps"), gps_map_filename_base); --- 9337,9344 ---- xastir_snprintf(temp, sizeof(temp), ! "mv %s/%s.shx %s/%s.shx", ! get_user_base_dir("gps"), gps_temp_map_filename_base, ! get_user_base_dir("gps"), gps_map_filename_base); *************** *** 9352,9359 **** xastir_snprintf(temp, sizeof(temp), ! "mv %s/GPS/%s.dbf %s/GPS/%s.dbf", ! get_data_base_dir("maps"), gps_temp_map_filename_base, ! get_data_base_dir("maps"), gps_map_filename_base); --- 9352,9359 ---- xastir_snprintf(temp, sizeof(temp), ! "mv %s/%s.dbf %s/%s.dbf", ! get_user_base_dir("gps"), gps_temp_map_filename_base, ! get_user_base_dir("gps"), gps_map_filename_base); *************** *** 9370,9374 **** --- 9370,9377 ---- f=fopen(SELECTED_MAP_DATA,"a"); // Open for appending if (f!=NULL) { + + //WE7U: Change this: fprintf(f,"GPS/%s\n",gps_map_filename); + (void)fclose(f); *************** *** 9420,9427 **** // Set up the postfix string. The files will be created in the ! // "SELECTED_MAP_DIR/GPS/" directory. xastir_snprintf(postfix, sizeof(postfix), ! "Shapefile_2D %s/GPS/", ! SELECTED_MAP_DIR); input_param = atoi((char *)arg); --- 9423,9430 ---- // Set up the postfix string. The files will be created in the ! // "~/.xastir/gps/" directory. xastir_snprintf(postfix, sizeof(postfix), ! "Shapefile_2D %s/", ! get_user_base_dir("gps")); input_param = atoi((char *)arg); *************** *** 9582,9586 **** // the first one. // ! // Note that the permissions on the "maps/GPS" directory have to be // set so that this user (or the root user?) can create files in // that directory. The permissions on the resulting files may need --- 9585,9589 ---- // the first one. // ! // Note that the permissions on the "~/.xastir/gps/" directory have to be // set so that this user (or the root user?) can create files in // that directory. The permissions on the resulting files may need *************** *** 22165,22168 **** --- 22168,22175 ---- } + if (filethere(get_user_base_dir("gps")) != 1) { + fprintf(stderr,"Making user gps dir\n"); + (void)mkdir(get_user_base_dir("gps"),S_IRWXU); + } |