[Groonga-commit] groonga/gcs [master] Create data storage directory with the permission 0700

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Dec 7 17:37:18 JST 2012


YUKI Hiroshi	2012-12-07 17:37:18 +0900 (Fri, 07 Dec 2012)

  New Revision: d4fc58a5ecda674593052cc83d8cedec639c8276
  https://github.com/groonga/gcs/commit/d4fc58a5ecda674593052cc83d8cedec639c8276

  Log:
    Create data storage directory with the permission 0700

  Modified files:
    lib/database/storage.js
    lib/wrapped-nroonga.js

  Modified: lib/database/storage.js (+3 -2)
===================================================================
--- lib/database/storage.js    2012-12-07 16:36:05 +0900 (ddc993d)
+++ lib/database/storage.js    2012-12-07 17:37:18 +0900 (9e3160d)
@@ -2,7 +2,8 @@
 
 var fs = require('fs');
 var path = require('path');
-var mkdirp = require('mkdirp');
+var 
+ = require('mkdirp');
 var rmRSync = require('../rm').rmRSync;
 var crypto = require('crypto');
 
@@ -36,7 +37,7 @@ FileStorage.prototype = {
   },
 
   saveSync: function(document) {
-    mkdirp.sync(this.directoryPath);
+    mkdirp.sync(this.directoryPath, 0700);
 
     var filePath = this.idToFilePath(document.id);
     if (path.existsSync(filePath))

  Modified: lib/wrapped-nroonga.js (+1 -1)
===================================================================
--- lib/wrapped-nroonga.js    2012-12-07 16:36:05 +0900 (d19a650)
+++ lib/wrapped-nroonga.js    2012-12-07 17:37:18 +0900 (249cbeb)
@@ -32,7 +32,7 @@ var TokenBigram =
 
 function Context(source) {
   if (typeof source == 'string') { // path
-    mkdirp.sync(path.dirname(source));
+    mkdirp.sync(path.dirname(source), 0700);
     this._path = source;
     this.open();
   } else if (source instanceof nroonga.Database)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index