Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Commit cda20e3

Browse files
committed
use original filename as base for tmp filename
1 parent 1e1703b commit cda20e3

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.swp
22
/node_modules/
33
*~
4+
lib/

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jfs",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"main": "./lib/Store",
55
"description": "A simple JSON file store",
66
"author": "Markus Kohlhase <mail@markus-kohlhase.de>",
@@ -24,12 +24,10 @@
2424
"istanbul": "~0.3.2",
2525
"mocha": "~2.0.1"
2626
},
27-
"repository": [
28-
{
29-
"type": "git",
30-
"url": "git://github.com/flosse/json-file-store.git"
31-
}
32-
],
27+
"repository": {
28+
"type": "git",
29+
"url": "git://github.com/flosse/json-file-store.git"
30+
},
3331
"maintainers": [
3432
{
3533
"name": "Markus Kohlhase",

src/Store.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ saveObjectToFile = (o, file, cb) ->
6060
json = JSON.stringify o, null, indent
6161
catch e
6262
return if cb? then cb e else e
63-
tmpFileName = "#{@_getFileName uuid.v4()}.tmp"
63+
tmpFileName = file + uuid.v4() + ".tmp"
6464
if cb?
6565
canWriteToFile file, (err) ->
6666
return cb err if err

0 commit comments

Comments
 (0)