You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you create a recording file with the same name as a folder in that directory, you will be unable to create the recording file f.exists() && !f.isDirectory() has problem in RecordingService.java
public void setFileNameAndPath(boolean isFilePathTemp) {
if (isFilePathTemp) {
mFileName = getString(R.string.default_file_name) + (++tempFileCount) + "_" + ".tmp";
mFilePath = Paths.combine(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC),
Paths.SOUND_RECORDER_FOLDER, mFileName);
} else {
int count = 0;
File f;
do {
++count;
mFileName =
getString(R.string.default_file_name) + "_" + (mDatabase.getCount() + count) + ".mp4";
mFilePath = Paths.combine(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC),
Paths.SOUND_RECORDER_FOLDER, mFileName);
f = new File(mFilePath);
} while (f.exists() && !f.isDirectory());//Bug in here
}
}
The text was updated successfully, but these errors were encountered:
If you create a recording file with the same name as a folder in that directory, you will be unable to create the recording file
f.exists() && !f.isDirectory()
has problem in RecordingService.javaThe text was updated successfully, but these errors were encountered: