Tag:

我怎么能等待写文件?

当我执行此程序时,它运行良好,但validation返回false。 如果我重新执行它,validation工作。 fullpath是备份的目录, refpath是原始文件的路径: if (fullpath.include?(refpath) && refpath.empty? == false && fullpath.empty? == false) diffpath= “#{fullpath} #{refpath}” puts diffpath sortie = IO.popen(“diff -Bb #{diffpath}”).readlines #(fullpath backup_dir) #puts fullpath if sortie.empty? puts “Les fichiers -#{f} sont identiques.” else puts “Modification : [#{refpath}] \n [#{fullpath}] ” end end 主要计划是: require “modif.rb” require “testdate.rb” require “restore_data.rb” #Pour la […]