diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2013-11-25 08:33:25 -0800 |
---|---|---|
committer | Nicholas Corgan <nick.corgan@ettus.com> | 2013-11-25 08:33:25 -0800 |
commit | ed765d904266585481eb0a7a4eb5b45fd031f95c (patch) | |
tree | 35272438b50d4efafa5b3c3b6c9a383b23c2af05 /host | |
parent | 7788c69225f68f67b95a5f778c7b45adf9cc046f (diff) | |
download | uhd-ed765d904266585481eb0a7a4eb5b45fd031f95c.tar.gz uhd-ed765d904266585481eb0a7a4eb5b45fd031f95c.tar.bz2 uhd-ed765d904266585481eb0a7a4eb5b45fd031f95c.zip |
usrp_n2xx_simple_net_burner: ~ now expands into user's home directory
Diffstat (limited to 'host')
-rw-r--r-- | host/utils/usrp_n2xx_simple_net_burner.cpp | 12 |
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); } |