Changeset 115 for trunk/lua/cli.lua
- Timestamp:
- 01/23/12 05:47:33 (16 months ago)
- File:
-
- 1 edited
-
trunk/lua/cli.lua (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lua/cli.lua
r111 r115 265 265 end 266 266 267 -- add/correct A/ as needed, replace \ with /268 function cli:make_camera_path(path)269 if not path then270 return 'A/'271 end272 -- fix slashes273 path = string.gsub(path,'\\','/')274 local pfx = string.sub(path,1,2)275 if pfx == 'A/' then276 return path277 end278 if pfx == 'a/' then279 return 'A' .. string.sub(path,2,-1)280 end281 return 'A/' .. path282 end283 284 267 cli:add_commands{ 285 268 { … … 520 503 -- no dst, use filename of source 521 504 if dst then 522 dst = cli:make_camera_path(dst)505 dst = fsutil.make_camera_path(dst) 523 506 if string.find(dst,'[\\/]$') then 524 507 -- trailing slash, append filename of source … … 543 526 end 544 527 else 545 dst = cli:make_camera_path(fsutil.basename(src))528 dst = fsutil.make_camera_path(fsutil.basename(src)) 546 529 end 547 530 … … 592 575 end 593 576 594 src = cli:make_camera_path(src)577 src = fsutil.make_camera_path(src) 595 578 if not args.nolua then 596 579 local src_st,err = con:stat(src) … … 734 717 local listops 735 718 local path=args[1] 736 path = cli:make_camera_path(path)719 path = fsutil.make_camera_path(path) 737 720 if args.l then 738 721 listopts = { stat='*' } … … 781 764 local bootfile=args[1] 782 765 if bootfile then 783 bootfile = cli:make_camera_path(bootfile)766 bootfile = fsutil.make_camera_path(bootfile) 784 767 bootfile = string.format("'%s'",bootfile) 785 768 else
Note: See TracChangeset
for help on using the changeset viewer.