Skip to content

Commit

Permalink
add a README file to a mosaik2 database directory, that contains the …
Browse files Browse the repository at this point in the history
…information that is a mosaik2 database directory
  • Loading branch information
f7a8 committed Dec 7, 2021
1 parent e4018d3 commit 08232c6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions mosaik2.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,6 @@ if(args[0] == "kill") {
console.log("saved tile count");
}
);
fs.chmod(ctx.thumbsDbName+'/'+ctx.thumbsDbFiles.tilecount,0o444,(err)=>{
if(err) {
console.error("error while set readony the tile count file");
}
});
fs.writeFile(
ctx.thumbsDbName+'/'+ctx.thumbsDbFiles.version, ""+DB_VERSION, {flag: 'a'}, function(err){
if(err){
Expand All @@ -574,6 +569,19 @@ if(args[0] == "kill") {
console.log("saved db version");
}
);
fs.writeFile(
ctx.thumbsDbName+'/README.txt', "This is a mosaik2 database directory.\n", {flag: 'a'}, function(err){
if(err){
console.error("error writing file", err); process.exit(1)
}
console.log("saved README");
}
);
fs.chmod(ctx.thumbsDbName+'/'+ctx.thumbsDbFiles.tilecount,0o444,(err)=>{
if(err) {
console.error("error while set readonly the tile count file");
}
});
fs.chmod(ctx.thumbsDbName+'/'+ctx.thumbsDbFiles.version,0o444,(err)=>{
if(err) {
console.error("error while set readonly the db version file");
Expand Down

0 comments on commit 08232c6

Please sign in to comment.