Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: duplicate files in separate folders #261

Open
kangruixiang opened this issue Nov 10, 2023 · 6 comments
Open

Windows: duplicate files in separate folders #261

kangruixiang opened this issue Nov 10, 2023 · 6 comments

Comments

@kangruixiang
Copy link

Hi, I'm using version v3.4.3 on Windows and using the shortcut option:

image

My understanding is that with this option all of the files will be moved to one folder with the albums in separate folders as links. But that doesn't seem to be the case.

In some cases, the files are still in separate folders. Example below, where there's folder for 2013/7 album and then separate folders under "ALL PHOTOS," both of which have original files.

image

Here's an example where some of the files are now links in the album folder, but then you have a few files that are duplicate under both album folder and "ALL PHOTOS" folder. I have one of the duplicate files highlighted here:

image

In other cases it seems to work. See below where the folder for album on the left have links instead:

image

It just seemed to be so random which version of those three I'll get.

@TheLastGimbus
Copy link
Owner

Oh... divide by dates also applies to albums... didn't know 😂

Very nice issue by the way - screenshots of everything, etc - thanks 🙏

There is a fallback that does exactly what you are seeing:

try {
result = await createShortcut(folder, mainFile);
} catch (e) {
// in case powershell fails/whatever
print('Creating shortcut for '
'${p.basename(mainFile.path)} in ${p.basename(folder.path)} '
'failed :(\n$e\n - coping normal file instead');
result = await moveFile();
}

Did you maybe see this error message while running - if so, we know the problem then

But, problem is still there... i have no idea why powershell didn't create those shortcuts... they seem to have normal nice names, no spaces or special characters........... maybe the folder has space in it's name??

Idk, but honestly this isn't especially stable feature of gpth 😕 - Windoza seeeems to support actual symlinks, we may migrate to that later: #248 (comment)

@kangruixiang
Copy link
Author

So I didn't see any error messages. Everything seemed to go smoothly until you go back to double check.

So I just ended up doing one big folder with years and months and json files. That worked ok but also didn't move all of the files in one go. I had to run the program like 4-5 times until everything got moved.

If I get a chance I'll go back and rename some of the folders to see if removing the space would help. Thanks for the reply.

@TheLastGimbus
Copy link
Owner

That worked ok but also didn't move all of the files in one go

Oh no. No no no no don't do this unless you're 100000% sure that's what happening

Please read #253 (comment) , and if you're still sure that gpth didn't move all of your photos we're calling an emergency meeting cause that would mean gpth is loosing people's photos 😬

@nk111
Copy link

nk111 commented Jan 3, 2024

I have observed the same behavior. The majority of my albums still contained original files after running GPTH with the same options like the OP. Some of these original files were even found in multiple albums. Some of them were NOT in the ALL_PHOTOS folder! So I would argue, yes, GPTH does not back up ALL photos in ALL_PHOTOS and there is a risk of losing files.

I downloaded the sources and re-exported everything to debug a little. Will report back.

@nk111
Copy link

nk111 commented Jan 3, 2024

One big problem seems to be that there are several albums (at least in my case) which contain files that are NOT in the year folders. For instance I've found three album folders with identical images that are not contained in any "photos from..." folder. In these cases the files end up in the big sorted media collection with no file in the group having a null key. That means that every copy will be copied physically and not as a shortcut since there is no mainfile. This should be handled by creating a mainfile first in these cases imho.

Here is an example of such a file:

image

@TheLastGimbus
Copy link
Owner

which contain files that are NOT in the year folders

well, thank you google - again :)

hm, this might actually be because you, for example, had them hidden in main timeline (by putting them in archive?) and putting them into albums at the same time?

This should be handled by creating a mainfile first in these cases imho

Yeah, absolutely. This is delicate, but i will try to make a fallback behavior for that 👍

@TheLastGimbus TheLastGimbus reopened this Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants