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

File enumeration/wildcards not implemented? (Windows) #25

Closed
CHaskell2 opened this issue Dec 21, 2019 · 2 comments
Closed

File enumeration/wildcards not implemented? (Windows) #25

CHaskell2 opened this issue Dec 21, 2019 · 2 comments

Comments

@CHaskell2
Copy link

CHaskell2 commented Dec 21, 2019

Since *.txt and such aren't resolved on windows (or at least in cmd.exe), filetags gets the wildcard string directly:

echo hello > test.txt

filetags -v --tags="hello" *.txt

DEBUG    2019-12-21 13:20:55,617 extracting list of files ...
DEBUG    2019-12-21 13:20:55,618 len(options.files) [1]
DEBUG    2019-12-21 13:20:55,618 1 filenames found: [*.txt]
DEBUG    2019-12-21 13:20:55,618 reported console width: 80 and height: 80   (80/80 is the fall-back)
DEBUG    2019-12-21 13:20:55,618 locate_and_parse_controlled_vocabulary: called with startfile: "*.txt"
DEBUG    2019-12-21 13:20:55,618 locate_and_parse_controlled_vocabulary: called in cwd: C:\temp
DEBUG    2019-12-21 13:20:55,618 locate_file_in_cwd_and_parent_directories: called with startfile "*.txt" and filename ".filetags" ..
DEBUG    2019-12-21 13:20:55,618 locate_file_in_cwd_and_parent_directories: no startfile found; using cwd as starting_dir [C:\temp] ......
DEBUG    2019-12-21 13:20:55,619 locate_file_in_cwd_and_parent_directories: looking for ".filetags" in directory "C:\" .......
DEBUG    2019-12-21 13:20:55,620 locate_file_in_cwd_and_parent_directories: did NOT find ".filetags" in current directory or any parent directory
DEBUG    2019-12-21 13:20:55,620 locate_and_parse_controlled_vocabulary: locate_file_in_cwd_and_parent_directories did NOT find any filename
DEBUG    2019-12-21 13:20:55,620 locate_and_parse_controlled_vocabulary: this is Windows: also look out for lnk-files that link to .filetags files ...
DEBUG    2019-12-21 13:20:55,620 locate_file_in_cwd_and_parent_directories: called with startfile "*.txt" and filename ".filetags.lnk" ..
DEBUG    2019-12-21 13:20:55,620 locate_file_in_cwd_and_parent_directories: no startfile found; using cwd as starting_dir [C:\temp] ......
DEBUG    2019-12-21 13:20:55,620 locate_file_in_cwd_and_parent_directories: looking for ".filetags.lnk" in directory "C:\" .......
DEBUG    2019-12-21 13:20:55,620 locate_file_in_cwd_and_parent_directories: did NOT find ".filetags.lnk" in current directory or any parent directory
DEBUG    2019-12-21 13:20:55,620 locate_and_parse_controlled_vocabulary: this is Windows: .filetags (non-lnk) was found
DEBUG    2019-12-21 13:20:55,620 locate_and_parse_controlled_vocabulary: could not derive filename for controlled vocabulary
DEBUG    2019-12-21 13:20:55,620 non-interactive mode: extracting tags from argument ...
DEBUG    2019-12-21 13:20:55,620 tags found: [hello]
DEBUG    2019-12-21 13:20:55,620 iterate over files ...
DEBUG    2019-12-21 13:20:55,620 determined maximum file name length with 5
ERROR    2019-12-21 13:20:55,620 File "*.txt" does not exist. Skipping this one …
DEBUG    2019-12-21 13:20:55,621 successfully finished.
@CHaskell2
Copy link
Author

CHaskell2 commented Dec 21, 2019

Seems like this would need a specific IS_WINDOWS block to enable this behavior for windows?

novoid added a commit that referenced this issue Dec 22, 2019
@novoid
Copy link
Owner

novoid commented Dec 22, 2019

It seems to be the case that with Windows, this is something every program has to do manually instead of assuming that the operating system or shell is providing file globbing resolving. I implemented a manual resolving but this is clearly out of my personal experience zone. So if there is still a problem, please re-check with most current version (GitHub or pip) and re-raise an issue.

@novoid novoid closed this as completed Dec 22, 2019
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

2 participants