mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
adjust keygen to use uuid only for notes (uuid on storage/folders woud need more refactoring)
This commit is contained in:
@@ -37,12 +37,12 @@ function moveNote (storageKey, noteKey, newStorageKey, newFolderKey) {
|
||||
return resolveStorageData(newStorage)
|
||||
.then(function findNewNoteKey (_newStorage) {
|
||||
newStorage = _newStorage
|
||||
newNoteKey = keygen()
|
||||
newNoteKey = keygen(true)
|
||||
let isUnique = false
|
||||
while (!isUnique) {
|
||||
try {
|
||||
sander.statSync(path.join(newStorage.path, 'notes', newNoteKey + '.cson'))
|
||||
newNoteKey = keygen()
|
||||
newNoteKey = keygen(true)
|
||||
} catch (err) {
|
||||
if (err.code === 'ENOENT') {
|
||||
isUnique = true
|
||||
|
||||
Reference in New Issue
Block a user