VictoriaFreSh 2022.2.21 → 2022.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/victoriafresh.rb +12 -8
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5293fd04253e9ab289f8827edf268ea5653d709402de849d5304ea19fc014a10
4
- data.tar.gz: c5aa96e8dd2a479a3d80b411299ae22c8d49f18fa20c3ad051913bbc375ba243
3
+ metadata.gz: 2f5fdea807cbe79b7f0404fdb41c508b2396393723654dd3975c54843fef3f01
4
+ data.tar.gz: dd5231d5d40d010a76dda08e3202b03a39700e258530ff82c499924936641bb1
5
5
  SHA512:
6
- metadata.gz: 39014b2e4a571cb0c8da0ddcc7f7d4c0ef4b41a3d61405ed519391d2bc6054d1686e1443be27701e31bd5eb995c99c95e98b465ff6c380b663a34caba6be6d0a
7
- data.tar.gz: 12f6a697b3b4d761cd713e26257e9e4901cd8da3ecbeff5358ae88e1fa0be97ae2f5f451423b9c509859c70c1c5edd78e96ee43dbf9e0bd528a75b931d742be5
6
+ metadata.gz: fcdc261a46837e00d5a4e5ef8c8d3bc20de3d9f0175725e218dfa52bbf45b30b65c2c348cb95c8c4b63d9b22c655db42dca9909b9c69d42c8c3757dfeaa2952f
7
+ data.tar.gz: 41233b561bf390bee10d4ceddd1321c2cb8b54fa1002ab4e4b6b9036e4b196b135a61a27fbd6d1a7bf3ab8b657128c9eaab11daf332ea0912bdae85573acd144
data/lib/victoriafresh.rb CHANGED
@@ -388,15 +388,19 @@ class VictoriaFresh
388
388
  unless isDirectory # 如果是目录就跳过
389
389
  #记录时间戳:
390
390
  directoryPath=directoryPathName.expand_path # 获取完整路径。
391
- mtimeStamp=File.mtime(directoryPath) #获取时间戳
392
-
393
- fileTimestamp=mtimeStamp.tv_sec # 获取秒数
394
391
 
395
- #puts "path: #{directoryPath}, time stamp: #{fileTimestamp}, threshold: #{@timestampThreshold}" # debug
396
-
397
- if (fileTimestamp< @timestampThreshold) # 文件的时间戳比阈值要小,过早了
398
- result =true # 是过早了
399
- end # if (fileTimestamp< @timestampThreshold) # 文件的时间戳比阈值要小,过早了
392
+ begin #读取时间戳
393
+ mtimeStamp=File.mtime(directoryPath) #获取时间戳
394
+
395
+ fileTimestamp=mtimeStamp.tv_sec # 获取秒数
396
+
397
+ #puts "path: #{directoryPath}, time stamp: #{fileTimestamp}, threshold: #{@timestampThreshold}" # debug
398
+
399
+ if (fileTimestamp< @timestampThreshold) # 文件的时间戳比阈值要小,过早了
400
+ result =true # 是过早了
401
+ end # if (fileTimestamp< @timestampThreshold) # 文件的时间戳比阈值要小,过早了
402
+ rescue Errno::ENOENT
403
+ end #begin #读取时间戳
400
404
  end # unless isDirectory # 如果是目录就跳过
401
405
 
402
406
  result # 返回结果
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: VictoriaFreSh
3
3
  version: !ruby/object:Gem::Version
4
- version: 2022.2.21
4
+ version: 2022.2.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hxcan Cai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-20 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hx_cbor