From 2c7e2c224d6004faa9701b070e6cb53a556defb1 Mon Sep 17 00:00:00 2001 From: Senjay-id <110238760+Senjay-id@users.noreply.github.com> Date: Fri, 10 May 2024 19:51:01 +0700 Subject: [PATCH 1/7] .mohidden files and .git directory skip --- src/usvfs_dll/usvfs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/usvfs_dll/usvfs.cpp b/src/usvfs_dll/usvfs.cpp index 652d2e4..08caa74 100644 --- a/src/usvfs_dll/usvfs.cpp +++ b/src/usvfs_dll/usvfs.cpp @@ -762,6 +762,9 @@ BOOL WINAPI VirtualLinkDirectoryStatic(LPCWSTR source, LPCWSTR destination, unsi for (winapi::ex::wide::FileResult file : winapi::ex::wide::quickFindFiles(sourceP.c_str(), L"*")) { if (file.attributes & FILE_ATTRIBUTE_DIRECTORY) { + if (file.fileName == L".git") { + continue; + } if ((file.fileName != L".") && (file.fileName != L"..")) { VirtualLinkDirectoryStatic((sourceW + file.fileName).c_str(), (destinationW + file.fileName).c_str(), @@ -771,6 +774,10 @@ BOOL WINAPI VirtualLinkDirectoryStatic(LPCWSTR source, LPCWSTR destination, unsi std::string nameU8 = ush::string_cast( file.fileName.c_str(), ush::CodePage::UTF8); + if (bfs::path(nameU8).extension() == ".mohidden") { + continue; + } + // TODO could save memory here by storing only the file name for the // source and constructing the full name using the parent directory context->redirectionTable().addFile( From 14fbb93eec224b8b462941431d84952337b98647 Mon Sep 17 00:00:00 2001 From: Ungeziefi <163609976+Ungeziefi@users.noreply.github.com> Date: Fri, 10 May 2024 15:36:39 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index b23376c..5888fda 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ -# usvfs - -[![License](http://img.shields.io/:license-gpl-blue.svg)](http://www.gnu.org/licenses/gpl-3.0.en.html) -[![Build status](https://ci.appveyor.com/api/projects/status/rfc2xe8mo9775smo?svg=true)](https://ci.appveyor.com/project/Modorganizer2/usvfs) -[![Coverity Scan Build Status](https://scan.coverity.com/projects/8941/badge.svg)](https://scan.coverity.com/projects/8941) - USVFS (short for User Space Virtual File System) aims to allow windows applications to create file or directory links that are visible to only a select set of processes. It does so by using api hooking to fool file access functions into discovering/opening files that are in fact somewhere else From 5af95759a50640a0854c1687baed58eda893a8fd Mon Sep 17 00:00:00 2001 From: Ungeziefi <163609976+Ungeziefi@users.noreply.github.com> Date: Fri, 10 May 2024 15:38:19 +0200 Subject: [PATCH 3/7] Update README.md --- README.md | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 5888fda..a5eb6cf 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,7 @@ -USVFS (short for User Space Virtual File System) aims to allow windows applications to create file or directory links that -are visible to only a select set of processes. -It does so by using api hooking to fool file access functions into discovering/opening files that are in fact somewhere else +https://github.com/ModOrganizer2/modorganizer -# Comparison to symbolic links +https://github.com/Ungeziefi/ML-ModOrganizer2 -The following is based on the final goal for usvfs and doesn't necessary reflect the current development state. +https://github.com/Ungeziefi/ML-USVFS -Unlike symbolic file links provided by NTFS -- links aren't visible to all applications but only to those the caller chooses -- links disappear when the "session ends" -- doesn't require write access to the link destination -- doesn't require administrator rights (neither for installation nor for use) -- links are filesystem independent so you can create links on fat32 drives, read-only media and network drives -- can link multiple directories on top of a single destination (overlaying) -- can also "virtually" unlink files, thus make them invisible to processes or replace existing files - -There are of course drawbacks -- will always impose a memory and cpu overhead though hopefully those will be marginal -- becomes active only during the initialization phase of each process so it may not be active at the time dependent dlls are loaded -- introduces a new source of bugs that can cause hard to diagnose problems in affected processes -- may rub antivirus software the wrong way as the used techniques are similar to what some malware does. - -# Current state - -usvfs is work in progress and should be considered in alpha state. -It is a core component of Mod Organizer v2 and thus receives serious real world testing - -# License - -usvfs is currently licensed under the GPLv3 but this may change in the future. - -# Contributing - -Contributions are very welcome but please notice that since I'm still undecided on licensing I have to ask all contributors to agree -to future licensing changes. +https://github.com/Ungeziefi/ML-NXMHandler From 56165502827d605e309b6ea6fa0fa035be7d9fc9 Mon Sep 17 00:00:00 2001 From: Ungeziefi <163609976+Ungeziefi@users.noreply.github.com> Date: Sat, 11 May 2024 07:57:12 +0200 Subject: [PATCH 4/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a5eb6cf..21a168e 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,5 @@ https://github.com/Ungeziefi/ML-ModOrganizer2 https://github.com/Ungeziefi/ML-USVFS https://github.com/Ungeziefi/ML-NXMHandler + +https://github.com/Ungeziefi/ML-DiagnoseBasic From 643b7175e1036690c242748bae76809503569b98 Mon Sep 17 00:00:00 2001 From: Ungeziefi <163609976+Ungeziefi@users.noreply.github.com> Date: Sat, 11 May 2024 08:10:17 +0200 Subject: [PATCH 5/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 21a168e..56708f2 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,5 @@ https://github.com/Ungeziefi/ML-USVFS https://github.com/Ungeziefi/ML-NXMHandler https://github.com/Ungeziefi/ML-DiagnoseBasic + +https://github.com/Ungeziefi/ML-TTWPlugin From 63f26d862d80ec80f91791706477177d73926af1 Mon Sep 17 00:00:00 2001 From: Ungeziefi Date: Tue, 14 May 2024 19:38:57 +0200 Subject: [PATCH 6/7] Update README.md --- README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/README.md b/README.md index 56708f2..f360c06 100644 --- a/README.md +++ b/README.md @@ -1,11 +1 @@ -https://github.com/ModOrganizer2/modorganizer - -https://github.com/Ungeziefi/ML-ModOrganizer2 - -https://github.com/Ungeziefi/ML-USVFS - -https://github.com/Ungeziefi/ML-NXMHandler - -https://github.com/Ungeziefi/ML-DiagnoseBasic - -https://github.com/Ungeziefi/ML-TTWPlugin +https://www.nexusmods.com/site/mods/874 \ No newline at end of file From df34e9d17694a0e67d33891570c9e99e9e84ffb1 Mon Sep 17 00:00:00 2001 From: Twinki Date: Tue, 14 May 2024 17:56:40 -0400 Subject: [PATCH 7/7] revert to old readme --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f360c06..b23376c 100644 --- a/README.md +++ b/README.md @@ -1 +1,42 @@ -https://www.nexusmods.com/site/mods/874 \ No newline at end of file +# usvfs + +[![License](http://img.shields.io/:license-gpl-blue.svg)](http://www.gnu.org/licenses/gpl-3.0.en.html) +[![Build status](https://ci.appveyor.com/api/projects/status/rfc2xe8mo9775smo?svg=true)](https://ci.appveyor.com/project/Modorganizer2/usvfs) +[![Coverity Scan Build Status](https://scan.coverity.com/projects/8941/badge.svg)](https://scan.coverity.com/projects/8941) + +USVFS (short for User Space Virtual File System) aims to allow windows applications to create file or directory links that +are visible to only a select set of processes. +It does so by using api hooking to fool file access functions into discovering/opening files that are in fact somewhere else + +# Comparison to symbolic links + +The following is based on the final goal for usvfs and doesn't necessary reflect the current development state. + +Unlike symbolic file links provided by NTFS +- links aren't visible to all applications but only to those the caller chooses +- links disappear when the "session ends" +- doesn't require write access to the link destination +- doesn't require administrator rights (neither for installation nor for use) +- links are filesystem independent so you can create links on fat32 drives, read-only media and network drives +- can link multiple directories on top of a single destination (overlaying) +- can also "virtually" unlink files, thus make them invisible to processes or replace existing files + +There are of course drawbacks +- will always impose a memory and cpu overhead though hopefully those will be marginal +- becomes active only during the initialization phase of each process so it may not be active at the time dependent dlls are loaded +- introduces a new source of bugs that can cause hard to diagnose problems in affected processes +- may rub antivirus software the wrong way as the used techniques are similar to what some malware does. + +# Current state + +usvfs is work in progress and should be considered in alpha state. +It is a core component of Mod Organizer v2 and thus receives serious real world testing + +# License + +usvfs is currently licensed under the GPLv3 but this may change in the future. + +# Contributing + +Contributions are very welcome but please notice that since I'm still undecided on licensing I have to ask all contributors to agree +to future licensing changes.