Skip to content

Commit

Permalink
Fix crash on Flipper PIN lock/disconnect while using file manager (co…
Browse files Browse the repository at this point in the history
…nt'd)
  • Loading branch information
gsurkov committed Jul 27, 2022
1 parent 2082efe commit 9e1b07c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/flipperzero/filemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,19 @@ void FileManager::historyBack()

void FileManager::rename(const QString &oldName, const QString &newName)
{
if(!checkDevice()) {
return;
}

registerOperation(m_device->rpc()->storageRename(remoteFilePath(oldName), remoteFilePath(newName)));
}

void FileManager::remove(const QString &fileName, bool recursive)
{
if(!checkDevice()) {
return;
}

registerOperation(m_device->rpc()->storageRemove(remoteFilePath(fileName), recursive));
}

Expand All @@ -141,6 +149,10 @@ void FileManager::beginMkDir()

void FileManager::commitMkDir(const QString &dirName)
{
if(!checkDevice()) {
return;
}

setNewDirectoryIndex(NEW_DIRECTORY_INDEX_INVALID);
registerOperation(m_device->rpc()->storageMkdir(remoteFilePath(dirName)));
}
Expand Down

0 comments on commit 9e1b07c

Please sign in to comment.