mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Trim database path in migrate page (#3140)
This commit is contained in:
@@ -16,6 +16,12 @@ export const Migrate: React.FC = () => {
|
|||||||
|
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
|
// if database path includes path separators, then this is passed through
|
||||||
|
// to the migration path. Extract the base name of the database file.
|
||||||
|
const databasePath = systemStatus
|
||||||
|
? systemStatus?.systemStatus.databasePath?.split(/[\\/]/).pop()
|
||||||
|
: "";
|
||||||
|
|
||||||
// make suffix based on current time
|
// make suffix based on current time
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
.toISOString()
|
.toISOString()
|
||||||
@@ -24,7 +30,7 @@ export const Migrate: React.FC = () => {
|
|||||||
.replace(/:/g, "")
|
.replace(/:/g, "")
|
||||||
.replace(/\..*/, "");
|
.replace(/\..*/, "");
|
||||||
const defaultBackupPath = systemStatus
|
const defaultBackupPath = systemStatus
|
||||||
? `${systemStatus.systemStatus.databasePath}.${systemStatus.systemStatus.databaseSchema}.${now}`
|
? `${databasePath}.${systemStatus.systemStatus.databaseSchema}.${now}`
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
const discordLink = (
|
const discordLink = (
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
* Changed Performer height to be numeric, and changed filtering accordingly. ([#3060](https://github.com/stashapp/stash/pull/3060))
|
* Changed Performer height to be numeric, and changed filtering accordingly. ([#3060](https://github.com/stashapp/stash/pull/3060))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 Bug fixes
|
||||||
|
* Fixed database backup in incorrect directory during migration when database location is an absolute path. ([#3140](https://github.com/stashapp/stash/pull/3140))
|
||||||
* Fixed gallery create post hook not being fired during gallery creation. ([#3134](https://github.com/stashapp/stash/pull/3134))
|
* Fixed gallery create post hook not being fired during gallery creation. ([#3134](https://github.com/stashapp/stash/pull/3134))
|
||||||
* Fixed autotag error when tagging a large amount of objects. ([#3106](https://github.com/stashapp/stash/pull/3106))
|
* Fixed autotag error when tagging a large amount of objects. ([#3106](https://github.com/stashapp/stash/pull/3106))
|
||||||
* Fixed Gallery title being incorrectly marked as mandatory for file- and folder-based galleries. ([#3110](https://github.com/stashapp/stash/pull/3110))
|
* Fixed Gallery title being incorrectly marked as mandatory for file- and folder-based galleries. ([#3110](https://github.com/stashapp/stash/pull/3110))
|
||||||
|
|||||||
Reference in New Issue
Block a user