mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-05-02 16:20:30 +00:00
export cvbi documents directory
This commit is contained in:
parent
a1f6364e52
commit
cb9beb0c38
3 changed files with 6 additions and 4 deletions
|
|
@ -43,6 +43,7 @@ import com.vectras.vm.MainService;
|
|||
import com.vectras.vm.R;
|
||||
import com.vectras.vm.StartVM;
|
||||
import com.vectras.vm.logger.VectrasStatus;
|
||||
import com.vectras.vm.utils.FileUtils;
|
||||
import com.vectras.vm.utils.UIUtils;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
|
@ -164,7 +165,7 @@ public class AdapterMainRoms extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||
new FileSource("/" + new File(current.itemIcon).getName(), new File(current.itemIcon)),
|
||||
new FileSource("/" + new File(MainActivity.activity.getExternalFilesDir("data") + "/rom-data.json").getName(), new File(MainActivity.activity.getExternalFilesDir("data") + "/rom-data.json"))
|
||||
};
|
||||
ZipUtil.pack(addedEntries, new File(AppConfig.datadirpath(MainActivity.activity) + "/cvbi/" + current.itemName + ".cvbi"));
|
||||
ZipUtil.pack(addedEntries, new File(FileUtils.getExternalFilesDirectory(MainActivity.activity).getPath() + "/cvbi/" + current.itemName + ".cvbi"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Runnable runnable = new Runnable() {
|
||||
|
|
@ -180,7 +181,7 @@ public class AdapterMainRoms extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||
@Override
|
||||
public void run() {
|
||||
progressDialog.cancel(); // cancelling Dialog.}
|
||||
UIUtils.UIAlert(MainActivity.activity, "DONE!", AppConfig.datadirpath(MainActivity.activity) + "/cvbi/" + current.itemName + ".cvbi");
|
||||
UIUtils.UIAlert(MainActivity.activity, "DONE!", FileUtils.getExternalFilesDirectory(MainActivity.activity).getPath() + "/cvbi/" + current.itemName + ".cvbi");
|
||||
}
|
||||
};
|
||||
MainActivity.activity.runOnUiThread(runnable);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import androidx.core.app.NotificationCompat;
|
|||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.vectras.qemu.MainSettingsManager;
|
||||
import com.vectras.vm.utils.FileUtils;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
|
|
@ -95,7 +96,7 @@ public class SplashActivity extends AppCompatActivity implements Runnable {
|
|||
distroDir.mkdirs();
|
||||
}
|
||||
|
||||
File cvbiDir = new File(AppConfig.datadirpath(activity) + "/cvbi");
|
||||
File cvbiDir = new File(FileUtils.getExternalFilesDirectory(activity).getPath() + "/cvbi");
|
||||
if (!cvbiDir.exists()) {
|
||||
cvbiDir.mkdirs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public class Terminal {
|
|||
// Handle exceptions by printing the stack trace in the terminal output
|
||||
final String errorMessage = e.getMessage();
|
||||
Log.e("Vterm ERROR:", errorMessage);
|
||||
com.vectras.vm.logger.VectrasStatus.logError("<font color='red'>Vterm ERROR: >"+ errorMessage+"</font>");
|
||||
//com.vectras.vm.logger.VectrasStatus.logError("<font color='red'>Vterm ERROR: >"+ errorMessage+"</font>");
|
||||
}
|
||||
}).start(); // Execute the command in a separate thread to prevent blocking the UI thread
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue