Hello community,

here is the log from the commit of package nodejs-fs-vacuum for 
openSUSE:Factory checked in at 2015-07-02 22:34:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-fs-vacuum (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs-fs-vacuum.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs-fs-vacuum"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-fs-vacuum/nodejs-fs-vacuum.changes        
2015-04-27 13:01:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.nodejs-fs-vacuum.new/nodejs-fs-vacuum.changes   
2015-07-02 22:34:52.000000000 +0200
@@ -1,0 +2,10 @@
+Sat Jun  6 04:55:58 UTC 2015 - i...@marguerite.su
+
+- update version 1.2.6
+
+-------------------------------------------------------------------
+Fri Apr 24 12:00:27 UTC 2015 - hvo...@suse.com
+
+- Update to version 1.2.5
+
+-------------------------------------------------------------------

Old:
----
  fs-vacuum-1.2.1.tgz

New:
----
  fs-vacuum-1.2.6.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs-fs-vacuum.spec ++++++
--- /var/tmp/diff_new_pack.zMv8by/_old  2015-07-02 22:34:52.000000000 +0200
+++ /var/tmp/diff_new_pack.zMv8by/_new  2015-07-02 22:34:52.000000000 +0200
@@ -19,9 +19,9 @@
 %define base_name fs-vacuum
 
 Name:           nodejs-fs-vacuum
-Version:        1.2.1
+Version:        1.2.6
 Release:        0
-Summary:        recursively remove empty directories -- to a point
+Summary:        Recursively remove empty directories -- to a point
 License:        ISC
 Group:          Development/Languages/Other
 Url:            https://github.com/npm/fs-vacuum

++++++ fs-vacuum-1.2.1.tgz -> fs-vacuum-1.2.6.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/LICENSE new/package/LICENSE
--- old/package/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/package/LICENSE 2015-05-21 20:35:19.000000000 +0200
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Forrest L Norvell
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/package.json new/package/package.json
--- old/package/package.json    2014-06-29 05:51:30.000000000 +0200
+++ new/package/package.json    2015-05-21 20:35:19.000000000 +0200
@@ -1,6 +1,6 @@
 {
   "name": "fs-vacuum",
-  "version": "1.2.1",
+  "version": "1.2.6",
   "description": "recursively remove empty directories -- to a point",
   "main": "vacuum.js",
   "scripts": {
@@ -24,10 +24,11 @@
   "devDependencies": {
     "mkdirp": "^0.5.0",
     "tap": "^0.4.11",
-    "tmp": "0.0.23"
+    "tmp": "0.0.24"
   },
   "dependencies": {
     "graceful-fs": "^3.0.2",
+    "path-is-inside": "^1.0.1",
     "rimraf": "^2.2.8"
   }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/vacuum.js new/package/vacuum.js
--- old/package/vacuum.js       2014-06-29 04:55:04.000000000 +0200
+++ new/package/vacuum.js       2014-12-19 13:16:19.000000000 +0100
@@ -1,6 +1,7 @@
-var assert  = require("assert")
-var dirname = require("path").dirname
-var resolve = require("path").resolve
+var assert   = require("assert")
+var dirname  = require("path").dirname
+var resolve  = require("path").resolve
+var isInside = require("path-is-inside")
 
 var rimraf  = require("rimraf")
 var lstat   = require("graceful-fs").lstat
@@ -19,9 +20,10 @@
 
   var log = options.log ? options.log : function () {}
 
-  var base = options.base
-  if (base && resolve(leaf).indexOf(resolve(base)) !== 0) {
-    return cb(new Error(resolve(leaf) + " is not a child of " + resolve(base)))
+  leaf = leaf && resolve(leaf)
+  var base = options.base && resolve(options.base)
+  if (base && !isInside(leaf, base)) {
+    return cb(new Error(leaf + " is not a child of " + base))
   }
 
   lstat(leaf, function (error, stat) {
@@ -59,8 +61,9 @@
   })
 
   function next(branch) {
+    branch = branch && resolve(branch)
     // either we've reached the base or we've reached the root
-    if ((base && resolve(branch) === resolve(base)) || branch === 
dirname(branch)) {
+    if ((base && branch === base) || branch === dirname(branch)) {
       log("finished vacuuming up to", branch)
       return cb(null)
     }
@@ -90,7 +93,14 @@
         var remove = stat.isDirectory() ? rmdir : unlink
         remove(branch, function (error) {
           if (error) {
-            if (error.code === "ENOENT") return cb(null)
+            if (error.code === "ENOENT") {
+              log("quitting because lost the race to remove", branch)
+              return cb(null)
+            }
+            if (error.code === "ENOTEMPTY") {
+              log("quitting because new (racy) entries in", branch)
+              return cb(null)
+            }
 
             log("unable to remove", branch, "due to", error.message)
             return cb(error)


Reply via email to