aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2013-11-25 08:33:25 -0800
committerNicholas Corgan <nick.corgan@ettus.com>2013-11-25 08:33:25 -0800
commited765d904266585481eb0a7a4eb5b45fd031f95c (patch)
tree35272438b50d4efafa5b3c3b6c9a383b23c2af05
parent7788c69225f68f67b95a5f778c7b45adf9cc046f (diff)
downloaduhd-ed765d904266585481eb0a7a4eb5b45fd031f95c.tar.gz
uhd-ed765d904266585481eb0a7a4eb5b45fd031f95c.tar.bz2
uhd-ed765d904266585481eb0a7a4eb5b45fd031f95c.zip
usrp_n2xx_simple_net_burner: ~ now expands into user's home directory
-rw-r--r--host/utils/usrp_n2xx_simple_net_burner.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/host/utils/usrp_n2xx_simple_net_burner.cpp b/host/utils/usrp_n2xx_simple_net_burner.cpp
index c3ccba173..1898ee9ae 100644
--- a/host/utils/usrp_n2xx_simple_net_burner.cpp
+++ b/host/utils/usrp_n2xx_simple_net_burner.cpp
@@ -468,13 +468,21 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
std::cout << "Searching for specified images." << std::endl << std::endl;
if(burn_fpga){
if(!use_custom_fpga) fpga_path = find_image_path(default_fpga_filename);
- else validate_custom_fpga_file(filename_map[hw_rev], fpga_path);
+ else{
+ //Replace ~ with home directory
+ if(fpga_path.find("~/") == 0) fpga_path.replace(0,1,getenv("HOME"));
+ validate_custom_fpga_file(filename_map[hw_rev], fpga_path);
+ }
grab_fpga_image(fpga_path);
}
if(burn_fw){
if(!use_custom_fw) fw_path = find_image_path(default_fw_filename);
- else validate_custom_fw_file(filename_map[hw_rev], fw_path);
+ else{
+ //Replace ~ with home directory
+ if(fw_path.find("~/") == 0) fw_path.replace(0,1,getenv("HOME"));
+ validate_custom_fw_file(filename_map[hw_rev], fw_path);
+ }
grab_fw_image(fw_path);
}