fix: restore current in-place project files
This commit is contained in:
@@ -318,8 +318,10 @@ export function runCopiesPath(run: ProjectRun, directory: string): string {
|
||||
export async function scanRestorableCopyFiles(run: ProjectRun, directory: string, current = true): Promise<{
|
||||
root: string; files: ProjectFile[]; skipped: number;
|
||||
}> {
|
||||
let root = current ? runCopiesPath(run, directory) : join(directory, "files");
|
||||
if (current && run.copyPath) {
|
||||
const inPlace = Boolean(run.inPlace || run.sourceInPlace);
|
||||
let root = current && inPlace ? canonicalProjectPath(run.projectPath)
|
||||
: current ? runCopiesPath(run, directory) : join(directory, "files");
|
||||
if (current && !inPlace && run.copyPath) {
|
||||
try {
|
||||
if (!(await fs.lstat(root)).isDirectory()) throw new Error("Kopienpfad ist kein regulärer Ordner.");
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user