question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App name is duplicated on Windows if author name is missing or None

See original GitHub issue

Issue Description

  • Python version: 3.9
  • appdirs version: 1.4.4

Linux:

>>> appdirs.user_data_dir('foo')
'/home/user/.local/share/foo'

Windows:

>>> appdirs.user_data_dir('foo')
'C:\\Users\\user\\AppData\\Local\\foo\\foo'

Specifying an empty string as second argument works to avoid this issue.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
YariKartoshe4kacommented, Jul 10, 2021

Noone forces you to have two levels of directories if you read the doc string

"appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.

I think this behavior is not very useful, but it can still help. Also some companies use subderictories e.g.: Mozilla (“Mozilla” dir has subdir “Firefox”, Opera (“Opera Software” dir has subdir “Opera Stable” etc)

0reactions
YariKartoshe4kacommented, Jul 10, 2021

I’m not a big Windows connoisseur, but most likely it’s just a good tone rule that doesn’t have to be followed… Hack with '' will be work until os.path.join has same bevavior

>>> os.path.join('foo', '', 'bar')
'foo/bar'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 Duplicate User on sign-in page
Click Start. · Type cmd, and then press CTRL+SHIFT+ENTER to open elevated command prompt (I.e. Command prompt with admin rights). · If the...
Read more >
Solution Explorer showing duplicate files
I am using the VS for mac welcome screen and selecting a New app with react and redux. I get duplicate file names...
Read more >
Gradle 7 requires duplicatesStrategy for "fake" duplicates
Gradle throws the duplicatesStrategy error, when the same source ... the title Gradle 7 requires duplicatesStrategy for no real duplicates ...
Read more >
How to Find and Remove Duplicate Files in Windows 10 & 11
Its “fuzzy matching algorithm” allows it to detect duplicate files when their file names or contents are similar, but not the same exactly....
Read more >
Identifying and removing duplicate records from systematic ...
The time taken to de-duplicate in each option and the number of false positives ... duplicates, two or more citations had to share...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found